SciPy

scipy.sparse.lil_matrix.astype

lil_matrix.astype(t)[source]