Bug: ZeroDivisionError when computing histogram for constant or near-constant data
Bug: ZeroDivisionError when computing histogram for constant or near-constant data: a task in repo2rlenv-swe-next (Harbor dataset). Calling Stats.get histogram counts() on a dataset where all (or nearly all) values are the same raises a ZeroDivisionError . This happens because the automatic…
The task
Calling `Stats.get_histogram_counts()` on a dataset where all (or nearly all) values are the same raises a `ZeroDivisionError`. This happens because the automatic bin-selection algorithm (Freedman-Diaconis) computes a bin width `dx` that is zero when the interquartile range is zero, and then divides by it.
Part of FineEnvs/repo2rlenv-swe-next.