<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 30, 2014 at 1:45 PM, Benjamin Root <span dir="ltr"><<a href="mailto:ben.root@ou.edu" target="_blank">ben.root@ou.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">What do you mean that the mean function doesn't take care of the case where the array is empty? In the example you provided, they both end up being NaN, which is exactly correct.</blockquote></div><br></div><div class="gmail_extra">Operations on masked arrays should not produce NaNs.  They should produce ma.masked.  For example,</div><div class="gmail_extra"><br></div><div class="gmail_extra">>>> np.ma.array(0)/0</div><div class="gmail_extra">masked</div><div class="gmail_extra"><br></div><div class="gmail_extra">The fact that the user sees runtime warnings also suggests that the edge case was not thought out.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div></div>