[Numpy-discussion] numpy histogram normed=True (bug / confusing behavior)

Robert Kern robert.kern@gmail....
Sat Aug 28 10:37:57 CDT 2010

On Sat, Aug 28, 2010 at 04:12, Zbyszek Szmek <zbyszek@in.waw.pl> wrote:
> Hi,
> On Fri, Aug 27, 2010 at 06:43:26PM -0600, Charles R Harris wrote:
>>    On Fri, Aug 27, 2010 at 2:47 PM, Robert Kern <robert.kern@gmail.com>
>>    wrote:
>>      On Fri, Aug 27, 2010 at 15:32, David Huard <david.huard@gmail.com>
>>      wrote:
>>      > Nils and Joseph,
>>      > Thanks for the bug report, this is now fixed in SVN (r8672).
>>      While we're at it, can we change the name of the argument? "normed"
>>      has caused so much confusion over the years. We could deprecate
>>      normed=True in favor of pdf=True or density=True.
> I think it might be a good moment to also include a different type of normalization:
>       n = n / n.sum()
> i.e. the frequency of counts in each bin. This one is of course very simple to calculate
> by hand, but very common. I think it would be useful to have this normalization
> available too. [http://www.itl.nist.gov/div898/handbook/eda/section3/histogra.htm]

My feeling is that this is trivial to do "by hand". I do not see a
reason to add an option to histogram() to do this.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the NumPy-Discussion mailing list