[Numpy-discussion] NA masks in the next numpy release?

Benjamin Root ben.root@ou....
Fri Oct 28 01:45:50 CDT 2011


> It should be possible to remove a mask when copying an array.
>

This was a concession on the part of those pushing for masks.  Eventually, I
ended up realizing that it resulted in a stronger design.

Consider the following:

foo(a[4:10])

Should function foo be able to access the rest of array "a", even though it
has a part of it?  Of course not!

Now, if one considers masking as a form of advanced slicing, then it wouldnt
make sense for foo() to be able to access parts it wasn't given.

That being said, this is where NumPy array views come into play.  You can
create a view of the original data, add masks to the view, and still have
access to all of the original data, unmasked.

Ben Root
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20111028/beb06ad0/attachment.html 


More information about the NumPy-Discussion mailing list