[Numpy-discussion] feedback request: proposal to add masks to the core ndarray
Fri Jun 24 14:38:14 CDT 2011
On Fri, Jun 24, 2011 at 1:04 PM, Matthew Brett <email@example.com>wrote:
> 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,
> NumPy-Discussion mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion