SciPy

scipy.sparse.csr_matrix.astype

csr_matrix.astype(t)[source]