summaryrefslogtreecommitdiff
path: root/numpy/lib/twodim_base.py
diff options
context:
space:
mode:
authorImportance of Being Ernest <elch.rz@ruetz-online.de>2017-04-23 15:01:23 +0200
committerEric Wieser <wieser.eric@gmail.com>2017-04-23 14:01:23 +0100
commit704c9cca7cb82cbe7077c7e69ebe21a9c00250ba (patch)
tree8805943970319d543813cd7423b35d893010db95 /numpy/lib/twodim_base.py
parentfdedc3b8357debc9eae11a9ab3f7ff2b71b9cf27 (diff)
downloadnumpy-704c9cca7cb82cbe7077c7e69ebe21a9c00250ba.tar.gz
DOC: Correct shape of edges in np.histogram2d (#8980)
If nx and ny are the bin counts (as stated in the bins argument's text), then the return H has indeed shape (nx, ny). However, the returned xedges and yedges will then have shape (nx+1,) and (ny+1,) respectively. Fixes #8979
Diffstat (limited to 'numpy/lib/twodim_base.py')
-rw-r--r--numpy/lib/twodim_base.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/twodim_base.py b/numpy/lib/twodim_base.py
index 8cf2ec091..28ebb8cbd 100644
--- a/numpy/lib/twodim_base.py
+++ b/numpy/lib/twodim_base.py
@@ -569,9 +569,9 @@ def histogram2d(x, y, bins=10, range=None, normed=False, weights=None):
The bi-dimensional histogram of samples `x` and `y`. Values in `x`
are histogrammed along the first dimension and values in `y` are
histogrammed along the second dimension.
- xedges : ndarray, shape(nx,)
+ xedges : ndarray, shape(nx+1,)
The bin edges along the first dimension.
- yedges : ndarray, shape(ny,)
+ yedges : ndarray, shape(ny+1,)
The bin edges along the second dimension.
See Also