Skip to content

Commit 940868b

Browse files
committed
fix: Use nmod_mat_set_entry rather than internals
1 parent 7b2c76d commit 940868b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/flint/types/nmod_mat.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ cdef class nmod_mat(flint_mat):
119119
row = val[i]
120120
for j from 0 <= j < n:
121121
x = nmod(row[j], mod)
122-
self.val.rows[i][j] = (<nmod>x).val
122+
nmod_mat_set_entry(self.val, i, j, x.val)
123123
else:
124124
raise TypeError("cannot create nmod_mat from input of type %s" % type(val))
125125
elif len(args) == 2:
@@ -134,7 +134,7 @@ cdef class nmod_mat(flint_mat):
134134
for i from 0 <= i < m:
135135
for j from 0 <= j < n:
136136
x = nmod(entries[i*n + j], mod) # XXX: slow
137-
self.val.rows[i][j] = (<nmod>x).val
137+
nmod_mat_set_entry(self.val, i, j, x.val)
138138
else:
139139
raise TypeError("nmod_mat: expected 1-3 arguments plus modulus")
140140

0 commit comments

Comments
 (0)