scipy.sparse.csr_matrix.setdiag
scipy.sparse.csr_matrix.sin
Element-wise sign.
See numpy.sign for more information.