Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
work around echenolize
Browse files Browse the repository at this point in the history
  • Loading branch information
edgarcosta committed Mar 29, 2021
1 parent 1045207 commit fb619b0
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/sage/matrix/matrix_nmod_dense.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,10 @@ cdef class Matrix_nmod_dense(Matrix_dense):
sig_off()
self.cache('rank', rank)
else:
if self._nrows < self._ncols:
M = self._new(self._ncols - self._nrows, self._ncols)
#FIXME: this doesn't work
self = M.stack(self)
self._howell_form()

def echelon_form(self):
Expand All @@ -523,7 +527,11 @@ cdef class Matrix_nmod_dense(Matrix_dense):
ans = self.fetch(key)
if ans is not None:
return ans
ans = self.__copy__()
if self._nrows < self._ncols:
M = self._new(self._ncols - self._nrows, self._ncols)
ans = M.stack(self)
else:
ans = self.__copy__()
ans.echelonize()
self.cache(key, ans)
return ans
Expand Down

0 comments on commit fb619b0

Please sign in to comment.