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

histogram: rightmost bin edge is missing #38

Open
nilsbecker opened this issue Nov 29, 2017 · 2 comments
Open

histogram: rightmost bin edge is missing #38

nilsbecker opened this issue Nov 29, 2017 · 2 comments

Comments

@nilsbecker
Copy link

the array of bin ranges should have length n_bins + 1.

@nilsbecker
Copy link
Author

nilsbecker commented Nov 29, 2017

more generally it would be better to have the option to specify non-uniform bin edges. e.g. an api like
histogram ?(bins=`N 10) ... where the bins keyword also accepts `Ranges of float array. unfortunately that would be backwards incompatible. or maybe, adding a new optional argument histogram ?(bins=10) ?ranges ... where ranges overrides bins if given?

@nilsbecker
Copy link
Author

i checked the 'statistics' haskell library. i get now where the used interface is coming from: the upper bin edges are known in principle since the bins are always uniform. still i think this is too limited for a generally useful histogram function; non-uniform bins are important. since the output dimension would have to change, this would probably need to be an API breakage, or a new function histogram_nonuniform would be needed...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant