Hello Jarrod and co., <br><br>here is my personal version of the histogram saga. <br><br>The current version of histogram puts in the rightmost bin all values larger than range, but does not put in the leftmost bin all values smaller than bin, eg.<br>
<br>In [6]: histogram([1,2,3,4,5,6], bins=3, range=[2,5])<br>Out[6]: (array([1, 1, 3]), array([ 2.,  3.,  4.]))<br><br>It discards 1, but puts 2 in the first bin, 3 in the second bin, and 4,5,6 in the third bin.  Also, the docstring  says that outliers are put in the closest bin, which is false. Another point to consider is normalization. Currently, the normalization factor is db=bin[1]-bin[0]. Of course, if the bins are not equally spaced, this will yield a spurious density. Also, I'd argue that since the rightmost bin covers the space from bin[-1] to infinity, it's density should always be zero. <br>
<br>Now if someone wants to explain all that in the docstring, that's fine by me. I fully understand the need to avoid breaking people's code. I simply hope that in the next big release, this behavior can be changed to something that is simpler: bins are the bin edges (instead of the left edges), and everything outside the edges is ignored. This would be a nice occasion to add an axis keyword and possibly weights, and would make histogram consistent with histogramdd. I'm willing to implement those changes, but I don't know how to do so without breaking histogram's behavior.<br>
<br>I just got Bruce reply, so sorry for the overlap.<br><br>David<br><br><div><span class="gmail_quote">2008/4/9, Jarrod Millman <<a href="mailto:millman@berkeley.edu" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">millman@berkeley.edu</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

Hello,<br> <br> I just turned this one into a blocker for now.  There has been a very<br> long and good discussion about this ticket:<br> <a href="http://projects.scipy.org/scipy/numpy/ticket/605" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://projects.scipy.org/scipy/numpy/ticket/605</a><br>

 <br> Could someone (David?, Bruce?) briefly summarize the problem and the<br> current proposed solution for us again?  Let's agree on the problem<br> and the solution.  I want to have something similiar to what is<br>

 written about median for this release:<br> <a href="http://projects.scipy.org/scipy/numpy/milestone/1.0.5" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://projects.scipy.org/scipy/numpy/milestone/1.0.5</a><br>
 <br> I agree with David's sentiment:  "This issue has been raised a number<br>
 of times since I follow this ML. It's not the first time I've proposed<br> patches, and I've already documented the weird behavior only to see<br> the comments disappear after a while. I hope this time some kind of<br>

 agreement will be reached."<br> <br> If you give me the short summary I will make sure Travis or Eric<br> respond (and I will put it in the release notes).<br> <br> Thanks,<br> <br><br> --<br> Jarrod Millman<br> Computational Infrastructure for Research Labs<br>

 10 Giannini Hall, UC Berkeley<br> phone: 510.643.4014<br> <a href="http://cirl.berkeley.edu/" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://cirl.berkeley.edu/</a><br> </blockquote></div><br>