summaryrefslogtreecommitdiff
path: root/numpy/lib/twodim_base.py
diff options
context:
space:
mode:
authorÅsmund Hjulstad <ahju@statoil.com>2015-02-13 14:10:12 +0100
committerÅsmund Hjulstad <ahju@statoil.com>2015-02-13 15:35:14 +0100
commit40fd50e125755bcf025fba629f8db76b4c2219cc (patch)
tree4061076c356238cf4f025be2bd95c858b0ad061d /numpy/lib/twodim_base.py
parent8cf7c4a9534e5444f07974e019383a395a8fac9e (diff)
downloadnumpy-40fd50e125755bcf025fba629f8db76b4c2219cc.tar.gz
DOC: Updated docstring for histogram2d as suggested in issue #5538
Also, added unittest for [int, array] combination arguments
Diffstat (limited to 'numpy/lib/twodim_base.py')
-rw-r--r--numpy/lib/twodim_base.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/numpy/lib/twodim_base.py b/numpy/lib/twodim_base.py
index 24dc3cced..464ffd914 100644
--- a/numpy/lib/twodim_base.py
+++ b/numpy/lib/twodim_base.py
@@ -589,16 +589,18 @@ def histogram2d(x, y, bins=10, range=None, normed=False, weights=None):
y : array_like, shape (N,)
An array containing the y coordinates of the points to be
histogrammed.
- bins : int or [int, int] or array_like or [array, array], optional
+ bins : int or array_like or [int, int] or [array, array], optional
The bin specification:
* If int, the number of bins for the two dimensions (nx=ny=bins).
- * If [int, int], the number of bins in each dimension
- (nx, ny = bins).
* If array_like, the bin edges for the two dimensions
(x_edges=y_edges=bins).
+ * If [int, int], the number of bins in each dimension
+ (nx, ny = bins).
* If [array, array], the bin edges in each dimension
(x_edges, y_edges = bins).
+ * A combination [int, array] or [array, int], where int
+ is the number of bins and array is the bin edges.
range : array_like, shape(2,2), optional
The leftmost and rightmost edges of the bins along each dimension