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:
1500
1500
Traceback (most recent call last):
1501
1501
...
1502
1502
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 ()]
1503
1518
"""
1504
1519
# Check basic Python types. This is very fast, so it doesn't
1505
1520
# hurt to do these first.
@@ -1524,6 +1539,8 @@ cdef class MatrixArgs:
1524
1539
cdef bint is_elt = isinstance (self .entries, Element)
1525
1540
if is_elt and isinstance (self .entries, Matrix):
1526
1541
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
1527
1544
t = type (self .entries)
1528
1545
try :
1529
1546
f = t._matrix_
You can’t perform that action at this time.
0 commit comments