Ticket #12964 (closed defect: fixed)
multiply matrix of matrices by a scalar: boom
|Reported by:||jhpalmieri||Owned by:||jason, was|
|Report Upstream:||N/A||Reviewers:||Mike Hansen|
|Authors:||Robert Bradshaw||Merged in:||sage-5.1.beta6|
Description (last modified by jhpalmieri) (diff)
From stackoverflow: Define a to be a matrix whose entries are matrices, and multiply a by a scalar:
a = matrix([[matrix([[ 1, 2], [ 3, 4]]), matrix([[ 5, 6], [ 7, 8]])], [matrix([[ 9, 10], [11, 12]]), matrix([[13, 14], [15, 16]])]]) 3 * a
This results in the following error message:
TypeError: unsupported operand parent(s) for '*': 'Full MatrixSpace of 2 by 2 dense matrices over Integer Ring' and 'Full MatrixSpace of 2 by 2 dense matrices over Integer Ring'
which is clearly nonsense. Multiplying a by, for example, 3 * identity_matrix(2) works, by the way.
Apply only 12964-fix-mul.patch.
- Status changed from new to needs_review
- Authors set to Mike Hansen
- Status changed from needs_review to positive_review
- Reviewers set to Mike Hansen
- Authors changed from Mike Hansen to Robert Bradshaw
- Status changed from positive_review to closed
- Resolution set to fixed
- Merged in set to sage-5.1.beta6