[Numpy-discussion] non-linear array manipulation
Gong, Shawn (Contractor)
Shawn.Gong at drdc-rddc.gc.ca
Tue Aug 12 10:37:51 EDT 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://mail.python.org/pipermail/numpy-discussion/attachments/20080812/b4d512fa/attachment.html>
More information about the NumPy-Discussion
mailing list