Skip to content

Generalized histogram binning function

Muhammad Zain Sohail requested to merge generalized_binning into main

Created by: daviddoji

I've made a generalization of the binning function. Now it can take any number of dimensions. There are still a couple of details I'm not yet fully convinced:

  • The name of the function: I personally do not like it but I kept the naming convention of the functions I replaced. Could we come up with something shorter or more descriptive?
  • The way we have to pass the sample argument. Even if we want to calculate a 1D histogram, the sample has to be passed as a 2D array (np.array[[....],1]). I couldn't find a proper way to remove that and be compatible with Numba :(

Let me know what you think before merging.

P.S.: I've added also a couple of tests for that function. P.S.2.: Sorry for the bad naming of the commit. I didn't squash them before pushing :(

Merge request reports

Loading