<div dir="ltr"><span style="font-family:arial;font-size:small">On Tue, Oct 1, 2013 at 3:57 AM, Ondřej Čertík <<a href="mailto:ondrej.certik@gmail.com">ondrej.certik@gmail.com</a>> wrote:</span><br><br>> I see, that makes sense. So to remember this, the rule is:<br>

><br>> "Specify elements that you want to get masked using True in 'mask'".<br><br><div>Yes. This convention dates back at least to the original MA package in Numeric; I don't know if Paul Dubois stole it from any previous software.</div>

<div><br></div><div>One way to motivate the convention is to think about doing a binary operation on masked arrays, which is really the most common kind of thing one does with masked arrays. The mask of the result is the logical OR of the two operand masks (barring additional masked elements from domain violations, 0/0, etc.). I assume that the convention was decided mostly on what was most convenient and efficient for the common internal operations for *implementing* the masked arrays and not necessarily matching any particular intuitions when putting data *into* the masked arrays.</div>

<div><br>--<br>Robert Kern<br></div></div>