Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3714425

Browse files
jklymakMeeseeksDev[bot]
authored andcommitted
Backport PR #15682: Make histogram_bin_edges private.
1 parent 5ad83b6 commit 3714425

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

lib/matplotlib/axes/_axes.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@
3636
from matplotlib.container import BarContainer, ErrorbarContainer, StemContainer
3737

3838
try:
39-
from numpy.lib.histograms import histogram_bin_edges
39+
from numpy.lib.histograms import (
40+
histogram_bin_edges as _histogram_bin_edges)
4041
except ImportError:
4142
# this function is new in np 1.15
42-
def histogram_bin_edges(arr, bins, range=None, weights=None):
43+
def _histogram_bin_edges(arr, bins, range=None, weights=None):
4344
# this in True for 1D arrays, and False for None and str
4445
if np.ndim(bins) == 1:
4546
return bins
@@ -6634,8 +6635,7 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
66346635
else:
66356636
_w = None
66366637

6637-
bins = histogram_bin_edges(np.concatenate(x),
6638-
bins, bin_range, _w)
6638+
bins = _histogram_bin_edges(np.concatenate(x), bins, bin_range, _w)
66396639
else:
66406640
hist_kwargs['range'] = bin_range
66416641

0 commit comments

Comments
 (0)