[Numpy-discussion] consensus (was: NA masks in the next numpy release?)

Charles R Harris charlesr.harris at gmail.com
Sat Oct 29 18:57:22 EDT 2011


On Sat, Oct 29, 2011 at 4:47 PM, Eric Firing <efiring at hawaii.edu> wrote:

> On 10/29/2011 12:02 PM, Olivier Delalleau wrote:
>
> >
> > I haven't been following the discussion closely, but wouldn't it be
> instead:
> > a.mask[0:2] = True?
>
> That would be consistent with numpy.ma and the opposite of Mark's
> implementation.
>
> I can live with either, but I much prefer the numpy.ma version because
> it fits with the use of bit-flags for editing data; set bit 1 if it
> fails check A, set bit 2 if it fails check B, etc.  So, if it evaluates
> as True, there is a problem, and the value is masked *out*.
>
> Similarly, in Marks implementation, 7 bits are available for a payload
> to describe what kind of masking is meant.  This seems more consistent
> with True as masked (or NA) than with False as masked.
>

I wouldn't rely on the 7 bits yet. Mark left them available to keep open
possible future use, but didn't implement anything using them yet. If memory
use turns out to exclude whole sectors of application we will have to go to
bit masks.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20111029/a7a345c6/attachment.html>


More information about the NumPy-Discussion mailing list