Closed Kyle6699 closed 2 years ago
Hi, I am not sure if I see the bug. Let's take for example:
max(series) == 10
min(series) == 0
nbins == 2
binsize = (max(series) - min(series)) / nbins # == 5.0
rng = max(series) - min(series) # == 10
If I plug in these numbers into formula for n
in line 160 I get n == 2
and not nbins + 1 == 3
as you suggest:
n = int(math.ceil(10 / 5.0)) # == 2
Can you provide an example case which demonstrated the error?
max_series = 3517.860166127188 min_series = -3093.4966492094213 nbins = 100 binsize = (max_series - min_series) / nbins int(math.ceil((max_series - min_series) / binsize))
I think the reason is floating-point accuracy from python.
Thank you for reporting the bug and providing a test case :clap::clap: New version 3.1.1 with a bugfix is now available on PyPI.
Hi,
I found a bug in this module: