#4206: [with patch, needs review] 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 jason):

  * summary:  [with patch, with positive review after fft timing regression
              is addressed] convert RDF and CDF vectors to
              use numpy => [with patch, needs review] convert
              RDF and CDF vectors to use numpy

Comment:

 I changed the behavior of the fft function in the vector_fft patch.  It
 now does a complex fft over a CDF vector, but a *real* fft over an RDF
 vector.  I also streamlined it, so now we get the following timings (after
 the patch):


 {{{
 sage: v=vector(RDF, range(1000000r))
 sage: n=v.numpy()
 sage: import scipy; import scipy.fftpack
 sage: timeit('a=v.fft()')
 5 loops, best of 3: 96.8 ms per loop
 sage: timeit('b=scipy.fftpack.rfft(n)')
 5 loops, best of 3: 98.3 ms per loop
 sage: timeit('a=v.inv_fft()')
 5 loops, best of 3: 106 ms per loop
 sage: timeit('b=scipy.fftpack.irfft(n)')
 5 loops, best of 3: 106 ms per loop
 sage: v=vector(CDF, range(1000000r))
 sage: n=v.numpy()
 sage: timeit('a=v.fft()')
 5 loops, best of 3: 182 ms per loop
 sage: timeit('b=scipy.fftpack.fft(n)')
 5 loops, best of 3: 181 ms per loop
 sage: timeit('a=v.inv_fft()')
 5 loops, best of 3: 207 ms per loop
 sage: timeit('b=scipy.fftpack.ifft(n)')
 5 loops, best of 3: 207 ms per loop
 }}}

 Since the behavior of the fft function is changed, I'm putting this as
 "needs review".  What I'm looking for is someone to pass off on the use of
 the real fft for RDF vectors.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4206#comment:41>
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to