SciPy

scipy.sparse.bsr_matrix.sign

bsr_matrix.sign()[source]

Element-wise sign.

See numpy.sign for more information.