diff --git a/inst/@sym/private/mat_rclist_access.m b/inst/@sym/private/mat_rclist_access.m index c46036a3..92a7c06c 100644 --- a/inst/@sym/private/mat_rclist_access.m +++ b/inst/@sym/private/mat_rclist_access.m @@ -35,9 +35,9 @@ cmd = {'(A, rr, cc) = _ins' 'AA = A.tolist() if isinstance(A, (MatrixBase, NDimArray)) else [[A]]' - 'MM = [[AA[i][j]] for i, j in zip(rr, cc)]' - 'M = make_2d_sym(MM)' - 'return M,'}; + 'M = [AA[i][j] for i, j in zip(rr, cc)]' + 'return _make_2d_sym(M, shape=(len(rr), 1)),' + }; rr = num2cell(int32(r-1)); cc = num2cell(int32(c-1)); diff --git a/inst/@sym/private/mat_rclist_asgn.m b/inst/@sym/private/mat_rclist_asgn.m index bf88254b..ef7caf84 100644 --- a/inst/@sym/private/mat_rclist_asgn.m +++ b/inst/@sym/private/mat_rclist_asgn.m @@ -58,7 +58,7 @@ % Easy trick to copy A into larger matrix AA: % AA = sp.Matrix.zeros(n, m) % AA[0, 0] = A - % Also usefil: .copyin_matrix + % Also useful: .copyin_matrix cmd = {'(A, rr, cc, b) = _ins' 'assert A == [] or not isinstance(A, list), "unexpectedly non-empty list: report bug!"'