[SciPy-User] Efficiently applying a function over a large array

denis denis-bz-gg@t-online...
Wed Feb 10 11:01:03 CST 2010

  it sounds as though MyFunction is doing quite a lot, say 100 times
more flops
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.

  -- denis

More information about the SciPy-User mailing list