my Numpy statements are slower than indexed formulations in some cases
16 Dec
2001
16 Dec
'01
7:05 a.m.
I have a number of thse routines in some EM code. I've tried to Numpyize them, but end up with code that runs even slower. Here is the old indexed routing: ----------------- for JJ in range(0,TotExtMetalEdgeNum): McVector+=Ccc[0:TotExtMetalEdgeNum,JJ] * VcVector[JJ] ---------------- Here is the Numpy version: --------------------- McVector= add.reduce(transpose(Ccc[...] * VcVector[...])) --------------------- I wonder if there is another faster way to do this? Thanks, Rob. -- The Numeric Python EM Project www.pythonemproject.com
8152
Age (days ago)
8159
Last active (days ago)
2 comments
1 participants
participants (1)
-
Rob