File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ cdef extern from "eclib/matrix.h":
5555 cdef cppclass mat:
5656 mat()
5757 mat(mat m)
58- scalar* get_entries()
58+ vector[ scalar] get_entries()
5959 scalar sub(long , long )
6060 long nrows()
6161 long ncols()
@@ -67,7 +67,7 @@ cdef extern from "eclib/smatrix.h":
6767 cdef cppclass smat:
6868 smat()
6969 smat(smat m)
70- scalar* get_entries()
70+ vector[ scalar] get_entries()
7171 scalar sub(long , long )
7272 long nrows()
7373 long ncols()
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ from sage.rings.integer_ring import ZZ
1010from sage.matrix.matrix_integer_sparse cimport Matrix_integer_sparse
1111from sage.matrix.matrix_integer_dense cimport Matrix_integer_dense
1212from sage.rings.integer cimport Integer
13-
13+ from libcpp.vector cimport vector
1414
1515cdef class Matrix:
1616 """
@@ -213,7 +213,7 @@ cdef class Matrix:
213213 """
214214 cdef long n = self .nrows()
215215 cdef long i, j, k
216- cdef scalar* v = < scalar* > self .M.get_entries() # coercion needed to deal with const
216+ cdef vector[ scalar] v = < vector[ scalar] > self .M.get_entries() # coercion needed to deal with const
217217
218218 cdef Matrix_integer_dense Td
219219 cdef Matrix_integer_sparse Ts
You can’t perform that action at this time.
0 commit comments