#10595: Vector constructor fails on empty list with no ring given
---------------------------------+------------------------------------------
Reporter: rbeezer | Owner: jason, was
Type: defect | Status: needs_review
Priority: major | Milestone: sage-4.7
Component: linear algebra | Keywords:
Author: Rob Beezer | Upstream: N/A
Reviewer: Dmitrii Pasechnik | Merged:
Work_issues: |
---------------------------------+------------------------------------------
Changes (by jhpalmieri):
* status: needs_work => needs_review
Comment:
Here's a patch which seems to fix the problem for me. I think the issue
was this: some Sage objects (like complex numbers) can be converted to
type "Sequence", and then those can be converted to vectors. But if those
objects had no "len", then the patch would cause problems, so the
"referee" patch tries to call "len", but ignores !TypeErrors.
By the way, the "vector" function already checks to see if
{{{v._vector_()}}} is defined, so another option would be to define a
{{{_vector_}}} method for complex numbers. This would fix many of the
doctest errors, but not all of them, because some of them pass other
objects (like generators) to "vector".
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10595#comment:13>
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.