MAINT: force reshaped sparse matrices to have the same format as the original matrix