<br><br><div class="gmail_quote">On Sat, Jun 25, 2011 at 9:21 AM, Charles R Harris <span dir="ltr"><<a href="mailto:charlesr.harris@gmail.com">charlesr.harris@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><div class="gmail_quote"><div>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.<br>
<br>Chuck <br></div></div>
<br></blockquote><div><br>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.<br>
<br>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,<br>
<br>Ben Root<br></div></div>