Skip to content

Commit 6532b20

Browse files
committed
replace redundant parent checks with sufficient condition in GF(2) matrix-vector multiplication
1 parent d531017 commit 6532b20

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/sage/matrix/matrix_mod2_dense.pyx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -692,9 +692,7 @@ cdef class Matrix_mod2_dense(matrix_dense.Matrix_dense): # dense or sparse
692692
if (
693693
self._nrows == self._ncols and
694694
isinstance(v, Vector_mod2_dense) and
695-
v.parent().is_full() and
696-
v.parent().degree() == self._nrows and
697-
v.parent().base_ring() is self._base_ring
695+
v.parent().rank() == self._ncols # check if the parent of v is full rank
698696
):
699697
VS = v.parent()
700698
else:

0 commit comments

Comments
 (0)