diff --git a/_tools/algebra/scipySparseFromNgMatrix.py b/_tools/algebra/scipySparseFromNgMatrix.py index 3a028e2fed8b2346de0bd75f5b0b792e5701e1e2..ce0795df62b9acafc7127b0e8de7bcacd5fc4659 100644 --- a/_tools/algebra/scipySparseFromNgMatrix.py +++ b/_tools/algebra/scipySparseFromNgMatrix.py @@ -7,7 +7,7 @@ def ScipySparseFromNgMatrix(a): import scipy.sparse as sp rows, cols, vals = a.mat.COO() - A = sp.csr_matrix( (vals.NumPy(), (rows, cols) ) ) + A = sp.csr_matrix( (vals.NumPy(), (rows, cols) ), shape=(a.mat.height, a.mat.width) ) return A