#4206: [with patch, needs work] convert RDF and CDF vectors to use numpy
----------------------------+-----------------------------------------------
Reporter: jason | Owner: was
Type: enhancement | Status: new
Priority: major | Milestone: sage-3.2.1
Component: linear algebra | Resolution:
Keywords: |
----------------------------+-----------------------------------------------
Comment (by was):
This is pretty painful to see. Basically your patch will make create a
real_double_dense vector from a TimeSeries extremely slow. (I.e., the
function .vector() becomes way slower.) Fortunately, it appears I don't
use that function anywhere else in the file. It would be good for you to
either fix this, or put
a large WARNING in the docstring for that function that it is slow and a
pointer to a trac ticket about fixing that problem. I say this because
one of the design constraints (clearly stated I hope in the
time_series.pyx file) is that every function in there be nearly "optimal".
{{{
220 cdef RealDoubleVectorSpaceElement x =
RealDoubleVectorSpaceElement(V, 0)
221 memcpy(x.v.data, self._values,
sizeof(double)*self._length)
222 cdef Vector_real_double_dense x =
Vector_real_double_dense(V, 0)
223 cdef int i
224 for i from 0 <= i < self._length:
225 x.set_unsafe(i, self._values[i])
226 # cdef int i
227 # for i from 0<=i<self._length:
228 # x.set_unsafe(i,self._values[i])
229
230 # memcpy(x._matrix_numpy.data, self._values,
sizeof(double)*self._length)
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4206#comment:10>
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
-~----------~----~----~----~------~----~------~--~---