id summary reporter owner description type status priority milestone component resolution keywords cc merged author reviewer upstream work_issues branch commit dependencies stopgaps
31086 Fix tensor product of dense matrix by sparse matrix Samuel Lelièvre "The tensor product of a dense matrix by a sparse matrix
fails for some base rings including cyclotomic fields.
Everything works fine over `ZZ` or `QQ`.
Illustration in Sage 9.3.beta4:
{{{
sage: k = CyclotomicField(3)
sage: I = identity_matrix(k, 2)
sage: J = identity_matrix(k, 2, sparse=True)
sage: J.tensor_product(J)
[1 0|0 0]
[0 1|0 0]
[---+---]
[0 0|1 0]
[0 0|0 1]
sage: J.tensor_product(I)
[1 0|0 0]
[0 1|0 0]
[---+---]
[0 0|1 0]
[0 0|0 1]
sage: I.tensor_product(I)
[1 0|0 0]
[0 1|0 0]
[---+---]
[0 0|1 0]
[0 0|0 1]
sage: I.tensor_product(J)
Traceback (most recent call last)
...
AttributeError: 'sage.matrix.matrix_generic_sparse.Matrix_generic_sparse'
object has no attribute '_rational_matrix'
}}}
Initial report by Will Orrick at
- [https://ask.sagemath.org/question/54762 Ask Sage question 54762: Tensor product of matrices over cyclotomic field]" defect new major sage-9.8 linear algebra matrix, tensor_product, dense, sparse Samuel Lelièvre N/A