#10537: Fix dictionary input to sparse vector constructor
------------------------------+---------------------------------------------
Reporter: rbeezer | Owner: jason, was
Type: defect | Status: new
Priority: major | Milestone: sage-4.6.2
Component: linear algebra | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------+---------------------------------------------
A dictionary can be used to specify the entries of a vector, and then the
result will be sparse. The degree of the vector is implicitly determined
by the largest key/index. You can fool this by creating a zero entry with
a large key/index. But then problems arise later if you try to use this
constructor with a dictionary created programatically - you can't fool it
twice.
So working with sparse matrices is either unreliable (as described), or
inefficient (convert from dictionaries to lists and back again).
Patch slowly ate away at the old `prepare_dict` until almost nothing was
left, and then it got subsumed into `prepare`. Passes all tests in
sage/modules and I will run full tests overnight.
Depends on 4.6.1.alpha3 and #10364 which had improved error messages for
this situation.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10537>
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.