Histogram function requires new features
Created by: laurentes
The current features of the histogram function are currently limited.
Among potential improvements, we could:
- Move the code to sp rather than ip, as histograms might be computed for any kind of signal.
- Add support for 1D, 3D and 4D arrays. The main difference is the number of for loop (cf. below). I even think that we could get rid of these for loops, as it seems to be one of the rare cases where we could use blitz iterators. In fact, we really do not care about the order when reading the data in the blitz arrays. In this case, we would only have templatized C++ functions (with int D as an additional template arguments).
- Add an histogram variant that allows to specify the bin boundaries instead of just the number of bins. This would allow people to create variable bin-size histograms. One should be inspired on the matplotlib.pyplot.hist method for details.
- Make histograms actually return NBINS + 2 entries. The first entry should be the number of underflows while the last entry, the number of overflows. Optionally, if this breaks the API too much one can implement the return of underflow/overflows as in/out parameters to the API.