numarray: how to make sinc(x) function - "divide by zero" !

Dec. 5, 2005
9:35 a.m.
Hi, The best I could come up with was: def sinc(r): na.Error.pushMode(all="ignore") a = na.where(r, na.divide(na.sin(r),r), 1) na.Error.popMode() return a but I still seem to get a warning...
F.sinc(0) Warning: Encountered invalid numeric result(s) in divide 1.0
Thanks, Sebastian Haase
7020
Age (days ago)
7020
Last active (days ago)
0 comments
1 participants
participants (1)
-
Sebastian Haase