[Numpy-discussion] Medians that ignore values

Charles R Harris charlesr.harris@gmail....
Thu Sep 18 13:40:28 CDT 2008


On Thu, Sep 18, 2008 at 12:23 PM, Pierre GM <pgmdevlist@gmail.com> wrote:

> On Thursday 18 September 2008 13:31:18 Peter Saffrey wrote:
> > The version in the Ubuntu package repository. It says 1:1.0.4-6ubuntu3.
>
> So it's 1.0 ? It's fairly old, that would explain.
>
> > > if you don't give an axis
> > > parameter, you should get the median of the flattened array, therefore
> a
> > > scalar, not an array.
> >
> > Not for my version.
>
> Indeed. Looks like the default axis changed from 0 in 1.0 to None in the
> incoming 1.2. But that's a detail at this point.
>
> > > Anyway: you should use ma.median for masked arrays. Else, you're just
> > > keeping the NaNs where they were.
> >
> > That will be the problem. My version does not have median or mean methods
> > for masked arrays, only the average() method.
>
> The method mean has always been around for masked arrays, so has the
> corresponding function. But I'm surprised, median has been in
> numpy.ma.extras
> for a while. Maybe not 1.0...
>
> > According to this page:
> >
> > http://www.scipy.org/Download
> >
> > 1.1.0 is the latest release.
>
> You need to update your internet ;) 1.1.1 was released 6 weeks ago.
>

The page had a typo, I've fixed it.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20080918/8834cdee/attachment.html 


More information about the Numpy-discussion mailing list