On Mon, Sep 30, 2013 at 7:05 PM, Ondřej Čertík <[email protected]>wrote:
> Hi, > > What is the rationale for using False in 'mask' for elements that > should be included? > > http://docs.scipy.org/doc/numpy/reference/maskedarray.generic.html > > As opposed to using True for elements that should be included, which > is what I was intuitively expecting when I started using the masked > arrays. This "True convention" also happens to be the one used in > Fortran, see e.g.: > > http://gcc.gnu.org/onlinedocs/gfortran/SUM.html > > So it's confusing why NumPy would chose a "False convention". Could it > be, that NumPy views 'mask' as opacity? Then it would make sense to > use True to make a value 'opaque'. > There was a lengthy discussion of this point back when the NA work was done. You might be able to find the thread with a search. As to why it is as it is, I suspect it is historical consistency. Pierre wrote the masked array package for numpy, but it may very well go back to the masked array package implemented for Numeric. Chuck
_______________________________________________ NumPy-Discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
