Using sparse matrix in scipy