#5184: nonzero_positions is broken for sparse vectors
----------------------------+-----------------------------------------------
Reporter: jhpalmieri | Owner: was
Type: defect | Status: new
Priority: minor | Milestone: sage-3.4.1
Component: linear algebra | Keywords:
----------------------------+-----------------------------------------------
Here is an illustration:
{{{
sage: v = vector({1: 1, 3: -1})
sage: w = vector({1: -1, 3: 0})
sage: v
(0, 1, 0, -1)
sage: w
(0, -1, 0, 0)
sage: v+w
(0, 0, 0, -1)
sage: (v+w).nonzero_positions()
[1, 3]
}}}
(I don't think this is related to #4648. nonzero_positions for sums of
sparse matrices seems to behave well in the one example I tried.)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5184>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---