#4973: [with patch, positive review] rewrite the function __getitem__ in
matrix0.pyx to support slices better, negative indices, and be faster
----------------------+-----------------------------------------------------
Reporter: mabshoff | Owner: jason
Type: defect | Status: assigned
Priority: major | Milestone: sage-3.3
Component: misc | Resolution:
Keywords: |
----------------------+-----------------------------------------------------
Comment (by jason):
Grrr, apparently I again copied the wrong thing. So much for middle-click
vs. ctrl-v.
*here* are the new timings:
{{{
sage: m=[(1, -2, -1, -1,9), (1, 8, 6, 2,2), (1, 1, -1, 1,4), (-1, 2, -2,
-1,4)];M= matrix(m)
sage: timeit('M[[1,2],[0,1,2]]')
625 loops, best of 3: 125 µs per loop
sage: timeit('M[[1,2],[0,1,2]]')
625 loops, best of 3: 120 µs per loop
sage: timeit('M[[1,2],[0,1,2]]')
625 loops, best of 3: 124 µs per loop
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4973#comment:17>
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
-~----------~----~----~----~------~----~------~--~---