[Numpy-discussion] percentile function for masked array?

Alexander Belopolsky ndarray at mac.com
Mon Jun 2 12:50:06 EDT 2014


On Mon, Jun 2, 2014 at 12:25 PM, Charles R Harris <charlesr.harris at gmail.com
> wrote:

> I think the masked array code is also due a cleanup/rationalization. Any
> comments you have along that line are welcome.


Here are a few thoughts:

1. Please avoid another major rewrite.
2. Stop pretending that instances of ma.MaskedArray and ndarray have "is a"
relationship.  Use of inheritance should become an implementation detail
and any method that is not explicitly overridden should raise an exception.
3. Add a mechanism to keep numpy and numpy.ma APIs in sync.  At a minimum -
add a test comparing public functions and methods and for pure python
functions compare signatures.
4. Consider deprecating the ma.masked scalar.
5. Support duck-typing in MaskedArray constructors.  If supplied data
object has mask attribute it should be used as mask.  This will allow
interoperability with alternative missing values implementations.  (ndarray
may itself grow mask attribute one day which will be equivalent to isnan.
 Bit views, anyone?)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140602/5046ab78/attachment.html>


More information about the NumPy-Discussion mailing list