vec for sparse matrices & sparsevec from matrices
Merge pull request #7666 from tanmaykm/spmatrix

vec for sparse matrices & sparsevec from matrices