[Numpy-discussion] mean of empty sequence gives nan
Mon Sep 27 17:51:59 CDT 2010
In numpy 1.5.0, I got the following for mean of an empty sequence (or array):
In : mean()
Warning: invalid value encountered in double_scalars
Is this behaviour expected ?
Also, would it be possible to have more explicit warning messages about the
problem being related numpy ?
It seems these message cause quite a bit of confusion to users. The
following would be more helpful :
Warning: invalid value encountered in numpy double_scalars
More information about the NumPy-Discussion