scipy.sparse
scipy.sparse.dok_matrix.asformat
scipy.sparse.dok_matrix.astype
dok_matrix.
asfptype
Upcast matrix to a floating point format (if necessary)