Using the MDL principle, it is possible to estimate parameters for a histogram-like model. The package contains the implementation of such an estimation method.
conda install r::r-histmdl