[SciPy-User] Efficiently applying a function over a large array
Wed Feb 10 11:01:03 CST 2010
it sounds as though MyFunction is doing quite a lot, say 100 times
than the outer loop ? If so, speeding up the loop would gain < 1 %.
You could timeit for i: for j: dummyfunc()
but in general describe, code, test, *then* look at the whole
picture / speedup.
Bytheway arr1[i,j,:] is fast too, no copy.
More information about the SciPy-User