[Numpy-discussion] [SciPy-user] median filter with clipping

Pierre GM pgmdevlist at gmail.com
Thu May 17 10:00:53 EDT 2007


n Thursday 17 May 2007 04:54:22 Travis Oliphant wrote:
> I'm inclined to move his masked array over to ma wholesale.  The fact
> that Pierre sees it as his baby is very important to me. 

Well, all the credits should go to Paul Dubois, the original author of 
numpy.core.ma, and the scores of people who helped him. maskedarray would not 
have come to existence without them.

> If it doesn't 
> have significant compatibility issues than I'm all for it.  

None that I've seen so far. MaskedArrays created by one package can be read by 
the other. With a one-line editing of a file (numerix/ma/__init__.py), 
matplotlib runs seamlessly with the new package.
But once again, it is not completely bug-free: I just found a couple of bugs 
this week-end, or even yesterday, that were brought to my attention by Matt 
Knox when playing with the TimeSeries package. Nothing major, just some minor 
annoyances.

> I'm mainly 
> interested in hearing how people actually using numpy.ma would respond.

One issue is that maskedarray *is* slower than numpy.core.ma. If performance 
is preferred over flexibility, then one should stick to numpy.core.ma. Some 
basic estimations show about 15%.
I'd be quite interested in hearing about actual users of the packages, in 
order to find what points to implement/modify.

#----------------------

On Thursday 17 May 2007 09:42:27 David Huard wrote:
> At the risk of offending Pierre's baby, I think that's a little premature.
> Not that maskedarray is not ready for general use on its own, but rather
> because subtle compatibility issues with numpy.ma may break matplotlib
> functions (I found one, and wouldn't be surprised to find others).

David, I wouldn't speak about compatibility, just about bugs: the problem was 
in the implementation of .max() w/ maskedarray. The origin of the problem was 
(is still) in umath.maximum.reduce that doesn't accept axis=None, so a numpy 
problem ;). But I agree: switching may have some subtle consequences in 
matplotlib (nothing that can't be quickly fiexed, however). What do Eric 
Firing, John Hunter and the other mpl developer think ?

My only request would be for more users ! That's the only way I can find how 
to improve maskedarray.



More information about the NumPy-Discussion mailing list