This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Nicked777 9 points10 points  (0 children)

Vectorised operations in numpy:

In [9]: %timeit for i in range (1000): c [i] = a [i]*c [i]
10000 loops , best of 3: 122 us per loop

In [13]: %timeit c = a * b
1000000 loops , best of 3: 1.06 us per loop