Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit cd72325

Browse filesBrowse files
committed
Fix numpy warning in hist
1 parent 932dd88 commit cd72325
Copy full SHA for cd72325

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎lib/matplotlib/axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes.py
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.