#13012: MatrixSpace is too eager to construct zero matrices
------------------------------+---------------------------------------------
Reporter: novoselt | Owner: jason, was
Type: defect | Status: new
Priority: major | Milestone: sage-5.1
Component: linear algebra | Keywords: sd40.5
Work issues: | Report Upstream: N/A
Reviewers: | Authors:
Merged in: | Dependencies:
Stopgaps: |
------------------------------+---------------------------------------------
This is a follow up to #10793 where it was prohibited to silently change
dimensions of a matrix preserving the number of entries (e.g. 3x2 to 2x3).
Here is the problem with zeros:
{{{
sage: m = zero_matrix(2, 3)
sage: m
[0 0 0]
[0 0 0]
sage: M = MatrixSpace(ZZ, 3, 5)
sage: M.zero()
[0 0 0 0 0]
[0 0 0 0 0]
[0 0 0 0 0]
sage: M(m)
[0 0 0 0 0]
[0 0 0 0 0]
[0 0 0 0 0]
}}}
The last line should have raised an exception. I'm writing a patch.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13012>
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.