[Numpy-discussion] min() of array containing NaN
Charles R Harris
Tue Aug 12 19:28:22 CDT 2008
On Tue, Aug 12, 2008 at 5:13 PM, Andrew Dalke <firstname.lastname@example.org>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.
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion