#12964: multiply matrix of matrices by a scalar: boom
-----------------------------------+----------------------------------------
Reporter: jhpalmieri | Owner: jason, was
Type: defect | Status: positive_review
Priority: major | Milestone: sage-5.1
Component: linear algebra | Resolution:
Keywords: | Work issues:
Report Upstream: N/A | Reviewers: Mike Hansen
Authors: Robert Bradshaw | Merged in:
Dependencies: | Stopgaps:
-----------------------------------+----------------------------------------
Description changed by jhpalmieri:
Old description:
> From [http://stackoverflow.com/questions/8691546/multiply-matrix-of-
> matrices-by-a-scalar-in-sage 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.
New description:
From [http://stackoverflow.com/questions/8691546/multiply-matrix-of-
matrices-by-a-scalar-in-sage 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 [attachment:12964-fix-mul.patch].
--
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12964#comment:7>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.