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

Skip to content

Commit cd72325

Browse files
committed
Fix numpy warning in hist
1 parent 932dd88 commit cd72325

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/axes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8072,7 +8072,7 @@ def hist(self, x, bins=10, range=None, normed=False, weights=None,
80728072
# so that each histogram uses the same bins
80738073
m, bins = np.histogram(x[i], bins, weights=w[i], **hist_kwargs)
80748074
if mlast is None:
8075-
mlast = np.zeros(len(bins)-1, np.float)
8075+
mlast = np.zeros(len(bins)-1, m.dtype)
80768076
if normed:
80778077
db = np.diff(bins)
80788078
m = (m.astype(float) / db) / m.sum()

0 commit comments

Comments
 (0)