[Numpy-discussion] Using matplotlib's prctile on masked arrays
Wed Oct 28 08:52:32 CDT 2009
On Tue, Oct 27, 2009 at 12:23 PM, Pierre GM <firstname.lastname@example.org> wrote:
> On Oct 27, 2009, at 7:56 AM, Gökhan Sever wrote:
> > Unfortunately, matplotlib.mlab's prctile cannot handle this division:
> Actually, the division's OK, it's mlab.prctile which is borked. It
> uses the length of the input array instead of its count to compute the
> nb of valid data. The easiest workaround in your case is probably to
> >>> prctile((am/bm).compressed(), p=[5,25,50,75,95])
Great. Exact solution. I should have asked this last week :)
One simple method solves all the riddle. I had manually masked the MVCs
My guess is using compressed() masked arrays could be used with any of
regularly defined numpy and scipy functions, right?
Thanks for the tip.
> NumPy-Discussion mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion