[Numpy-discussion] non-linear array manipulation
Gong, Shawn (Contractor)
Shawn.Gong@drdc-rddc.gc...
Tue Aug 12 09:37:51 CDT 2008
hi list,
The following array manipulation takes long time because I can't find
ways to do in row/column, and have to do cell by cell. Would you check
to see if there is a nicer/faster way for this non-linear operation?
for i in range(rows):
for j in range(columns):
a[i][j] = math.sqrt( max(0.0, a[i][j]*a[i][j] - b[j]*c[j]) )
thanks,
Shawn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080812/b4d512fa/attachment.html
More information about the Numpy-discussion
mailing list