Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Be more explicit about bins too narrow for float representation #79

Open
janpipek opened this issue Mar 9, 2022 · 1 comment
Open
Assignees
Milestone

Comments

@janpipek
Copy link
Owner

janpipek commented Mar 9, 2022

If the computed range for the binning divided by the number of bins is lower than the minimum float difference at the scale, we receive an error [ValueError: Bins not in rising order.] which is not very informative.

To reproduce:

data = [1, np.nextafter(1, 2)]
physt.h1(data)

It also happens when the range is 0, like in:

data = [1, 1]
physt.h1(data)
@janpipek janpipek added this to the 0.6 milestone Nov 12, 2022
@janpipek janpipek self-assigned this Nov 12, 2022
@janpipek
Copy link
Owner Author

There should be a way how to find bins even when there is just one unique value. Numpy does that.

@janpipek janpipek modified the milestones: 0.6, 0.7 Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant