2008/8/12 Stéfan van der Walt <[EMAIL PROTECTED]>:
> Hi Andrew
>
> 2008/8/12 Andrew Dalke <[EMAIL PROTECTED]>:
>> This is buggy for the case of a list containing only NaNs.
>>
>>  >>> import numpy as np
>>  >>> np.NAN
>> nan
>>  >>> np.min([np.NAN])
>> nan
>>  >>> np.nanmin([np.NAN])
>> inf
>>  >>>
>
> Thanks for the report.  This should be fixed in r5630.

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. Really nanmin of an array containing only nans should be the same
as an empty array; both should be infinity.

I guess this is a problem for types that don't have an infinity
(returning maxint is a poor substitute), but what is the correct
behaviour here?

Anne
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to