diff --git a/src/pandas_profiling/model/summary_algorithms.py b/src/pandas_profiling/model/summary_algorithms.py index 014ea5a1e..5be607cb0 100644 --- a/src/pandas_profiling/model/summary_algorithms.py +++ b/src/pandas_profiling/model/summary_algorithms.py @@ -41,7 +41,8 @@ def histogram_compute( max_bins = config.plot.histogram.max_bins if bins_arg == "auto" and len(stats[name][1]) > max_bins: - stats[name] = np.histogram(finite_values, bins=max_bins, weights=None) + bins_arg = np.histogram_bin_edges(finite_values, bins=max_bins) + stats[name] = np.histogram(finite_values, bins=bins_arg, weights=None) return stats