Hi Olivier,<br><br>Please don't top post, it isn't the custom on this list.<br><br><div class="gmail_quote">On Wed, Nov 21, 2012 at 7:22 PM, Olivier Delalleau <span dir="ltr"><<a href="mailto:shish@keba.be" target="_blank">shish@keba.be</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">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"><div><div class="h5">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>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">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></font></span></div></div></blockquote></div></blockquote><div><br>The warnings vary and don't directly give information on the cause, i.e., empty arrays. If we do go with warnings I think they should be more specific.<br>
<br>Chuck <br></div></div>