NP Sign no 0

np.sign(x) + (x == 0)
Benja