fix #7650 reshape of empty sparse matrices
Merge pull request #7651 from tanmaykm/spmatrix

fix #7650 reshape of empty sparse matrices