How come srange is so slow compared to numpy arange?
----------------------------------------------------------------------
| Sage Version 3.4.alpha0, Release Date: 2009-02-24 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: import numpy
sage: timeit('srange(1.5r,4r,universe=float,check=False)')
625 loops, best of 3: 40 µs per loop
sage: timeit('list(numpy.arange(1.5r,4r))')
625 loops, best of 3: 7.76 µs per loop
sage:
srange(1.5r,4r,universe=float,check=False)==list(numpy.arange(1.5r,4r))
True
Is there a Sage command for constructing a list of python floats that
gets equivalent speed as the numpy arange command?
Thanks,
Jason
--~--~---------~--~----~------------~-------~--~----~
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-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---