Make numba_histogramdd work as np.histogramdd
This pull request fixes the inconsistant behaviour of the function _hist_from_bins
. The aim is to mimic the behaviour of np.histogramdd
in 'numba_histogramdd'.
I believe this to be the best solution as it is easier to implement for non-linear bins. Converting a list of center points in a non-linear array to the ranges of the bins defined around them can lead to unexpected behaviour, different from the users expectation. By explicitly requiring the bins edges and not the bins centers leaves more space to the user to define peculiar binnings.
Furthermore, I added test functions, which ensure the behaviour of numba_histogramdd
to behave as np.histogramdd
.
The only remaining exception is the fact we do not (yet) support weights and density as np does.
If agreed upon, this closes #67 (closed) and the long discussion about the inconsistent binning behaviour