Numpy.sign () em Python
#Use numpy sign method will return array with corresponding signs
import numpy as np
arr = np.array([-10, 0, 15])
print(np.sign(arr)) # will return [-1, 0, 1]
Coderunner