[Numpy-discussion] feedback request: proposal to add masks to the core ndarray
Sat Jun 25 14:44:12 CDT 2011
On Sat, Jun 25, 2011 at 9:21 AM, Charles R Harris <email@example.com
> I think he aims to support both. One complication with masks is keeping
> them tied to the data on disk. With na values one file can contain both the
> data and the missing data markers, whereas with masks, two files would be
> required. I don't think that will fly in the long run unless there is some
> standard file format, like geotiff for GIS, that combines both.
I think you hit on a very important issue. How do we save this data? The
NA approach provides an inherent solution (although this does assume that
the magic value is known and agreed to because it is not recorded.
Meanwhile, masks are separate structures.
I have been so accustomed to simply creating masks on the fly that I never
bothered to save them (or I simply harden them with a fill value of NaNs or
whatnot). As for a filetype that I use when I do want to save this
information, I typically use NetCDF with a "missing" attribute defined or
just use NaNs. The scipy.io.netcdf module could be improved to look for a
"missing" attribute and set an appropriate NA value automatically,
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion