[Numpy-discussion] ticket #605

Bruce Southey bsouthey@gmail....
Wed Apr 9 08:56:15 CDT 2008


Jarrod Millman wrote:
> Hello,
>
> I just turned this one into a blocker for now.  There has been a very
> long and good discussion about this ticket:
> http://projects.scipy.org/scipy/numpy/ticket/605
>
> Could someone (David?, Bruce?) briefly summarize the problem and the
> current proposed solution for us again?  Let's agree on the problem
> and the solution.  I want to have something similiar to what is
> written about median for this release:
> http://projects.scipy.org/scipy/numpy/milestone/1.0.5
>
> I agree with David's sentiment:  "This issue has been raised a number
> of times since I follow this ML. It's not the first time I've proposed
> patches, and I've already documented the weird behavior only to see
> the comments disappear after a while. I hope this time some kind of
> agreement will be reached."
>
> If you give me the short summary I will make sure Travis or Eric
> respond (and I will put it in the release notes).
>
> Thanks,
>
>   
Hi,
Simply put, there are actually multiple problems with the histogram 
function for certain cases.

1) The initial problem was that points below the first bin are ignored: 
 From Tommy Grav's email:

bin1 -> 1 to 2.99999...
bin2 -> 3 to 4.99999...
bin3 -> 5 to inf

This means there is no bin for -inf to 1 and, thus, the cause of the 
initial bug report.

2) The second problem is to address how to account for any 'outliers'. 
Based on the responses, David included the keyword 'discard' to handle 
these.

3) The 'norm' option may be wrong but I do not have any current 
understanding of this one.

Solution:
David has provided a new version of the histogram function that was 
provided to the list. It also had some enhancements like an axis 
keyword. However, there is a potential bug associated with the use of 
the numpy.r_ function. Once that is overcome, I think that his code is 
an excellent replacement for the current version. But I can understand 
if this is applied to the next release.

Regards
Bruce

 


More information about the Numpy-discussion mailing list