[Numpy-discussion] Re: [SciPy-user] Messing with missing values

Sasha ndarray at mac.com
Mon Feb 27 08:14:02 CST 2006

On 2/27/06, pgmdevlist at mailcan.com <pgmdevlist at mailcan.com> wrote:
> ...
> I remmbr a message a couple of weeks ago wondering whether ma should be kpet
> uptodate with the rest of numpy (and of course, I can't find the reference
> right now). What's the status on ma ?

Ma will be supported in numpy.  See FAQ
<http://new.scipy.org/Wiki/FAQ> "Does NumPy support nan ("not a

Ma development page is at
http://projects.scipy.org/scipy/numpy/wiki/MaskedArray .
Feel free to add contents there.  I would welcome a section listing
numpy functions that are still not available in ma.

> Let's take the `median` example for 2D arrays.

Median is one of those examples where Paul's recommendation does not
work because missing values should be ignored rather than filled.  For
example, in R median has two modes: to ignore missing values and to
return missing value if any value is missing:

> median(c(1,NA))
[1] NA
> help(median)
> median(c(1,NA),na.rm=TRUE)
[1] 1
> median(c(1,0))
[1] 0.5

More information about the Numpy-discussion mailing list