[Numpy-discussion] feedback request: proposal to add masks to the core ndarray

Mark Wiebe mwwiebe@gmail....
Fri Jun 24 14:38:14 CDT 2011

On Fri, Jun 24, 2011 at 1:04 PM, Matthew Brett <matthew.brett@gmail.com>wrote:

> Hi,
> Just as a use case, if I do this:
> a = np.zeros((big_number,), dtype=np.int32)
> a[0,0] = np.NA
> I think I'm right in saying that, with the array.mask implementation
> my array memory usage with grow by new big_number bytes, whereas with
> the np.naint32 implementation you'd get something like:
> Error('This data type does not allow missing values')
> Is that right?

Not really, I much prefer having the operation of adding a mask always be
very explicit. It should raise an exception along the lines of "Cannot
assign the NA missing value to an array with no validity mask".


> See y'all,
> Matthew
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20110624/96524f45/attachment.html 

More information about the NumPy-Discussion mailing list