#4206: [with patch, with positive review after fft timing regression is
addressed]
convert RDF and CDF vectors to use numpy
----------------------------+-----------------------------------------------
Reporter: jason | Owner: jason
Type: enhancement | Status: assigned
Priority: major | Milestone: sage-3.2.2
Component: linear algebra | Resolution:
Keywords: |
----------------------------+-----------------------------------------------
Changes (by jkantor):
* summary: [with patch, needs review] convert RDF and CDF vectors to use
numpy => [with patch, with positive review
after fft timing regression is addressed]
convert RDF and CDF vectors to use numpy
Comment:
Overall the design looks good to me and the interface with numpy looks
good. A few things I noticed.
1. For large arrays around a million, object creation is ever so slightly
slower than the old class it seems, I'm guessing thats numpy's falt, there
is maybe nothing you can do about that.
2. More seriously the fft function is quite a bit slower.
For example it takes about 15 seconds to do fft on a vector of lenth a
million. Scipy only takes 0.72 to do the fft, and the old class also only
took about a second. I'll look and see if I have any suggestions about the
bottle neck, this probably should be fixed. It seemed most other
operations were about the same speed but it might be good to double check
this.
3. One suggestion, I think it would cool if in vector_double_dense.pxd you
make the _vector_numpy array public as in
{{{
cdef public cnumpy.ndarray _vector_numpy
}}}
then it is possible to do something like
{{{
v=vector(RDF,[1,2,3])
v._vector_numpy[0]=3
}}}
this could be useful to pass something to scipy without having to copy.
You could make it readonly instead of public if you don't want people to
be able to modify through that mechanism.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4206#comment:38>
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
-~----------~----~----~----~------~----~------~--~---