1 | initial version |
You can do:
sage: M = CartesianProduct(M1, M1, M2)
sage: M
Cartesian product of Full MatrixSpace of 1 by 1 dense matrices over Rational Field, Full MatrixSpace of 1 by 1 dense matrices over Rational Field, Full MatrixSpace of 2 by 2 dense matrices over Rational Field
But then you will lose the algebra structure:
sage: M.category()
Category of enumerated sets
sage: M1.category()
Category of algebras over Rational Field
It should be possible to keep this structure by doing something like:
sage: M1.cartesian_product(M1,M2)
But then you will get an
AttributeError: type object 'MatrixSpace' has no attribute 'CartesianProduct'