Open janpipek opened 7 years ago
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.
np.histogram
Suggestion: when parameters allow, fall back to np variant.
Related: #48
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.
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.