<br><br><div class="gmail_quote">On Thu, Jun 23, 2011 at 2:53 PM, Mark Wiebe <span dir="ltr"><<a href="mailto:mwwiebe@gmail.com">mwwiebe@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Enthought has asked me to look into the "missing data" problem and how NumPy could treat it better. I've considered the different ideas of adding dtype variants with a special signal value and masked arrays, and concluded that adding masks to the core ndarray appears is the best way to deal with the problem in general.<div>
<br></div><div>I've written a NEP that proposes a particular design, viewable here:</div><div><br></div><div><a href="https://github.com/m-paradox/numpy/blob/cmaskedarray/doc/neps/c-masked-array.rst" target="_blank">https://github.com/m-paradox/numpy/blob/cmaskedarray/doc/neps/c-masked-array.rst</a></div>
<div><br></div><div>There are some questions at the bottom of the NEP which definitely need discussion to find the best design choices. Please read, and let me know of all the errors and gaps you find in the document.</div>
<div><br></div></blockquote><div><br>I agree that low level support for masks is the way to go.<br><br>> If all the input values are masked, 'sum' and 'prod' will produce
the additive and multiplicative identities respectively<br><br>A masked zero dimensional array might be another option, depending on how you handle scalars. This would also work when arrays were summed down an axis if a masked array was returned.<br>
<br>I suppose the problem with using the word 'mask' is the implication that it hides something. Maybe 'window' would be an alternate choice, although in this context I tend to think of 'mask' as having the meaning you assign to it.<br>
<br>Chuck <br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div></div><div>Thanks,</div><div>Mark</div>
<br>_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@scipy.org">NumPy-Discussion@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/numpy-discussion" target="_blank">http://mail.scipy.org/mailman/listinfo/numpy-discussion</a><br>
<br></blockquote></div><br>