File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1500,6 +1500,21 @@ cdef class MatrixArgs:
15001500 Traceback (most recent call last):
15011501 ...
15021502 NameError: name 'a' is not defined
1503+
1504+ Check that :issue:`38221` is fixed::
1505+
1506+ sage: # needs sage.groups
1507+ sage: G = CyclicPermutationGroup(7)
1508+ sage: R = GF(2)
1509+ sage: A = G.algebra(R)
1510+ sage: matrix(A, 3, 3, A.zero())
1511+ [0 0 0]
1512+ [0 0 0]
1513+ [0 0 0]
1514+ sage: matrix(A, 3, 3, A.one())
1515+ [() 0 0]
1516+ [ 0 () 0]
1517+ [ 0 0 ()]
15031518 """
15041519 # Check basic Python types. This is very fast, so it doesn't
15051520 # hurt to do these first.
@@ -1524,6 +1539,8 @@ cdef class MatrixArgs:
15241539 cdef bint is_elt = isinstance (self .entries, Element)
15251540 if is_elt and isinstance (self .entries, Matrix):
15261541 return MA_ENTRIES_MATRIX
1542+ if is_elt and self .base is not None and self .entries.parent() == self .base:
1543+ return MA_ENTRIES_SCALAR
15271544 t = type (self .entries)
15281545 try :
15291546 f = t._matrix_
You can’t perform that action at this time.
0 commit comments