SciPy

scipy.sparse.coo_matrix.sign

coo_matrix.sign()[source]

Element-wise sign.

See numpy.sign for more information.