[Numpy-discussion] bug with with fill_values in masked arrays?
Thu Mar 20 09:17:20 CDT 2008
Sorry for my delayed answers: I'm on the road these days and can't connect to
the web as often and well I'd like to.
On Wednesday 19 March 2008 19:47:37 Matt Knox wrote:
> > 1. why am I not getting my NaN's back?
Because they're gone when you create your masked array. The idea here is to
get rid of the nan in your data to avoid potential problems while keeping
track of where the nans were in the first place. So, the .data part of your
masked array should be nan-free, and the mask tells you where the nans were.
> > 2. why is the wrong fill value being used here?
> the second element in the array iteration here is actually the
> numpy.ma.masked constant, which always has the same fill value...
Couldn't say it better.
More information about the Numpy-discussion