[Numpy-discussion] min() of array containing NaN

Joe Harrington jh@physics.ucf....
Fri Aug 15 07:12:09 CDT 2008


> If you're willing to do arithmetic you might even be able to
> pull it off, since NaNs tend to propagate:
> if (new<min) min -= (min-new);
> Whether the speed of this is worth its impenetrability I couldn't say.

Code comments cure impenetrability, and have no cost in speed.  One
could write a paragraph explaining it (if it really needed that
much).  The comments could even reference the current discussion.

--jh--


More information about the Numpy-discussion mailing list