On Tue, Dec 30, 2014 at 1:45 PM, Benjamin Root <[email protected]> wrote:

> 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.


Operations on masked arrays should not produce NaNs.  They should produce
ma.masked.  For example,

>>> np.ma.array(0)/0
masked

The fact that the user sees runtime warnings also suggests that the edge
case was not thought out.
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to