[Numpy-discussion] Re: Numpy-discussion digest, Vol 1 #1632 - 10 msgs

Pierre GM pierregm at engr.uga.edu
Wed Mar 22 17:37:03 CST 2006


> Pierre has implemented the clip method for ma.array, but his
> implementation does not seem to do the right thing if min or max is
> masked:

From core/oldnumeric.py:
    """clip(m, m_min, m_max) = every entry in m that is less than m_min is
    replaced by m_min, and every entry greater than m_max is replaced by
    m_max.
    """
My understanding was that m_min and m_max were two floats, not two arrays. I 
completely oversaw that. Your suggestion (masking where the limits are 
masked) makes complete sense. I'll work on that.




More information about the Numpy-discussion mailing list