We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb8417b commit edb121fCopy full SHA for edb121f
src/sage/matrix/matrix2.pyx
@@ -8548,9 +8548,18 @@ cdef class Matrix(Matrix1):
8548
[5 4 3]
8549
[4 5 3]
8550
[1 0 2]
8551
+ sage: M = matrix(ZZ, 0, 0, [])
8552
+ sage: M.permutation_normal_form() # needs sage.graphs
8553
+ []
8554
"""
8555
nrows = self.nrows()
8556
ncols = self.ncols()
8557
+ if not nrows or not ncols:
8558
+ if not check:
8559
+ return self
8560
+ from sage.groups.perm_gps.permgroup_named import SymmetricGroup
8561
+ return (self, (SymmetricGroup(nrows).one(),
8562
+ SymmetricGroup(ncols).one()))
8563
8564
# A helper
8565
def new_sorted_matrix(m):
0 commit comments