SciPy

scipy.sparse.bsr_matrix.asfptype

bsr_matrix.asfptype()[source]

Upcast matrix to a floating point format (if necessary)