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

h1 (resp. calculate_frequencies) is too slow #35

Open
janpipek opened this issue Apr 15, 2017 · 2 comments
Open

h1 (resp. calculate_frequencies) is too slow #35

janpipek opened this issue Apr 15, 2017 · 2 comments
Assignees
Milestone

Comments

@janpipek
Copy link
Owner

Actually, ~10 times slower than np.histogram. It has its reasons but (being more general) but in the simple case, we should not add any overhead.

Suggestion: when parameters allow, fall back to np variant.

@janpipek janpipek added the bug label Apr 15, 2017
@janpipek janpipek self-assigned this Apr 15, 2017
@janpipek janpipek added performance and removed bug labels Apr 15, 2017
@janpipek janpipek added this to the 0.4 milestone Apr 15, 2017
janpipek added a commit that referenced this issue May 27, 2017
Addressing #35, but does not work properly yet => wrong errors2, wrong statistics, ...
@janpipek
Copy link
Owner Author

janpipek commented Nov 1, 2018

Related: #48

@janpipek
Copy link
Owner Author

janpipek commented Nov 1, 2018

For regular binning, it is possible to use this:

contents = linspace(...)
indexes = (data - low) / (high - low) # data is an array
numpy.add.at(contents, indexes, 1)

As suggested by Jim Pivarski.

@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