Open smelczer opened 1 month ago
note that this works
sage: M=MatrixSpace(W,1,1)
sage: M(D[0])
[dt]
and
sage: matrix(W,1,1,D[0])
[dt]
It was pointed out to me that
W = DifferentialWeylAlgebra(PolynomialRing(SR,['t']))
D = list(W.differentials())
matrix(W,[[D[0]]])
works on all versions of Sage. It seems that up until 10.3 the matrix constructor could take a list and would make it a 1-row matrix (a vector). But 10.3+ requires its input to be a 2-d array (i.e., a list of lists) with 1 row. Not sure if this is intended behaviour with 10.3+, but if so then this issue should be closed.
Steps To Reproduce
In SageMath 10.3 or 10.4, run
or
Expected Behavior
The 1x1 matrix [dt] over the ring W
Actual Behavior
Throws error
TypeError: unable to convert (0,) to a symbolic expression
Additional Information
Changing SR to another base ring gives an analogous error. The matrix constructor seems to try and put the differential in the base ring of W instead of W itself. Playing around in CoCalc, this error does not appear in SageMath 10.2 or earlier, but does appear in 10.3 and 10.4. Not sure if there were any changes to
matrix
(orDifferentialWeylAlgebra
) in 10.3 that could be the cause.Environment
Checklist