[Numpy-discussion] min() of array containing NaN
Charles R Harris
charlesr.harris@gmail....
Tue Aug 12 19:28:22 CDT 2008
On Tue, Aug 12, 2008 at 5:13 PM, Andrew Dalke <dalke@dalkescientific.com>wrote:
> On Aug 12, 2008, at 9:54 AM, Anne Archibald wrote:
> > Er, is this actually a bug? I would instead consider the fact that
> > np.min([]) raises an exception a bug of sorts - the identity of min is
> > inf.
>
<snip>
>
> Personally, I expect that if my array 'x' has a NaN then
> min(x) must be a NaN.
>
I suppose you could use
min(a,b) = (abs(a - b) + a + b)/2
which would have that effect.
Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080812/df0e2c97/attachment.html
More information about the Numpy-discussion
mailing list