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