[SciPy-user] removing NaN...

fred fredmfp@gmail....
Mon Jun 25 10:56:35 CDT 2007


Pierre GM a écrit :
> On Monday 25 June 2007 11:22:48 fred wrote:
>   
>> Hi,
>>
>> I work on data arrays with many NaN.
>>
>> How can I remove them and find min & max values ?
>>     
>
> First possibility: mask the NaNs, then use .min and .max
> data = masked_array(data, mask=isnan(data))
>
> Second possibility:
> use nanmax & nanmin
>
> http://www.scipy.org/Numpy_Example_List_With_Doc
>   
Sorry, I did not know this link.
Bookmarked now.

That's simply great.

Thanks a lot.

Cheers,

-- 
http://scipy.org/FredericPetit



More information about the SciPy-user mailing list