From 63a4ef168d64e3571fa2891b4777ba4b570ac169 Mon Sep 17 00:00:00 2001 From: Sohaib Arshid Date: Thu, 5 Jan 2023 17:22:10 +0100 Subject: [PATCH] Added histogram_bin_egdes with max_bins --- src/pandas_profiling/model/summary_algorithms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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