From 940868bcf5c93b6527c4cfd5d0124d3ff3fcb33b Mon Sep 17 00:00:00 2001 From: Oscar Benjamin Date: Mon, 27 Jan 2025 23:30:56 +0100 Subject: [PATCH] fix: Use nmod_mat_set_entry rather than internals --- src/flint/types/nmod_mat.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/flint/types/nmod_mat.pyx b/src/flint/types/nmod_mat.pyx index 4ba93a9c..3da5108a 100644 --- a/src/flint/types/nmod_mat.pyx +++ b/src/flint/types/nmod_mat.pyx @@ -119,7 +119,7 @@ cdef class nmod_mat(flint_mat): row = val[i] for j from 0 <= j < n: x = nmod(row[j], mod) - self.val.rows[i][j] = (x).val + nmod_mat_set_entry(self.val, i, j, x.val) else: raise TypeError("cannot create nmod_mat from input of type %s" % type(val)) elif len(args) == 2: @@ -134,7 +134,7 @@ cdef class nmod_mat(flint_mat): for i from 0 <= i < m: for j from 0 <= j < n: x = nmod(entries[i*n + j], mod) # XXX: slow - self.val.rows[i][j] = (x).val + nmod_mat_set_entry(self.val, i, j, x.val) else: raise TypeError("nmod_mat: expected 1-3 arguments plus modulus")