#19700: Inconsistency in Matrix_*_dense.__init__
------------------------------+-----------------------------
Reporter: mmezzarobba | Owner:
Type: defect | Status: new
Priority: major | Milestone: sage-6.10
Component: linear algebra | Keywords:
Merged in: | Authors:
Reviewers: | Report Upstream: N/A
Work issues: | Branch:
Commit: | Dependencies:
Stopgaps: |
------------------------------+-----------------------------
The behaviour of `__init__` when called with an iterable `Element` as
initializer is not consistent between different types of dense matrices:
{{{
sage: vec = vector(ZZ, [1])
sage: MatrixSpace(RR, 1, 1)(vec)
[1.00000000000000]
sage: MatrixSpace(CC, 1, 1)(vec)
[1.00000000000000]
sage: MatrixSpace(ZZ, 1, 1)(vec)
[...]
TypeError: unable to coerce entry to an integer
sage: MatrixSpace(QQ, 1, 1)(vec)
[...]
TypeError: entries must be coercible to a list or integer
sage: MatrixSpace(ZZ['t'], 1, 1)(vec)
[1]
}}}
Specialized versions probably should follow what generic matrices do.
--
Ticket URL: <http://trac.sagemath.org/ticket/19700>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.