NP Sign No 0

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