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

Skip to content

Commit c057c97

Browse files
committed
Make histogram_bin_edges private.
It's not public in any release yet, and will be removable as soon as mpl3.3 which bumps the numpy dependency to 1.15.
1 parent fc413b3 commit c057c97

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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
@@ -6698,8 +6699,7 @@ def hist(self, x, bins=None, range=None, density=False, weights=None,
66986699
else:
66996700
_w = None
67006701

6701-
bins = histogram_bin_edges(np.concatenate(x),
6702-
bins, bin_range, _w)
6702+
bins = _histogram_bin_edges(np.concatenate(x), bins, bin_range, _w)
67036703
else:
67046704
hist_kwargs['range'] = bin_range
67056705

0 commit comments

Comments
 (0)