Current behavior looks sensible to me. I personally would prefer no warning but I think it makes sense to have one as it can be helpful to detect issues faster.<br><br>-=- Olivier<br><br><div class="gmail_quote">2012/11/21 Charles R Harris <span dir="ltr"><<a href="mailto:charlesr.harris@gmail.com" target="_blank">charlesr.harris@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">What should be the value of the mean, var, and std of empty arrays? Currently<br><br><span style="font-family:courier new,monospace">In [12]: a<br>
Out[12]: array([], dtype=int64)<br><br>In [13]: a.mean()<br>Out[13]: nan<br>
<br>In [14]: a.std()<br>Out[14]: nan<br><br>In [15]: a.var()<br>Out[15]: nan<br><br><font face="arial,helvetica,sans-serif">I think the nan comes from 0/0. All of these also raise warnings the first time they are called.<br>

<br>Chuck<br></font></span><br>
<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>