On 3 June 2013 08:33, David Cournapeau wrote:
> (around 50 on my own machine, but that's platform
> specific).
In my machine, it is around 10. You also have to be aware of the data
container: it is not the same to iterate over lists than over arrays.
In [6]: a = np.arange(50)
In [7]: %timeit np
On Mon, 3 Jun 2013 07:33:23 +0100
David Cournapeau wrote:
> > While not surprising, I did not expect numpy to be so much slower (25x)...
> It is a known limitation of numpy scalars. As soon as you use array
> that are not tiny, the speed difference disappears and then favors
> numpy arrays (aroun
On Mon, Jun 3, 2013 at 6:29 AM, Jerome Kieffer wrote:
> Hello,
>
> I am giving some introduction tutorials to numpy and we notices a big
> difference in speed between nuumpy and math for trigonometric
> operations:
>
> In [3]: %timeit numpy.sin(1)
> 10 loops, best of 3: 2.27 us per loop
>
> In
Hello,
I am giving some introduction tutorials to numpy and we notices a big
difference in speed between nuumpy and math for trigonometric
operations:
In [3]: %timeit numpy.sin(1)
10 loops, best of 3: 2.27 us per loop
In [4]: %timeit math.sin(1)
1000 loops, best of 3: 92.3 ns per loop
W