summaryrefslogtreecommitdiff
path: root/numpy/lib/histograms.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2018-03-26 00:40:00 -0700
committerEric Wieser <wieser.eric@gmail.com>2018-04-06 16:26:05 -0700
commit79e482a410dfb3dcdc47f409c1ef76826f00a98d (patch)
treeb22e281d5a779b103f724b02266951c1acf8456d /numpy/lib/histograms.py
parent992163e51d48d26df05430690052e42dbdd7fe9b (diff)
downloadnumpy-79e482a410dfb3dcdc47f409c1ef76826f00a98d.tar.gz
DOC: Document the surprising behaviour of np.histogramdd on array_likes
Diffstat (limited to 'numpy/lib/histograms.py')
-rw-r--r--numpy/lib/histograms.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/numpy/lib/histograms.py b/numpy/lib/histograms.py
index c0cfa07c7..bd2f80186 100644
--- a/numpy/lib/histograms.py
+++ b/numpy/lib/histograms.py
@@ -779,10 +779,18 @@ def histogramdd(sample, bins=10, range=None, normed=False, weights=None):
Parameters
----------
- sample : array_like
- The data to be histogrammed. It must be an (N,D) array or data
- that can be converted to such. The rows of the resulting array
- are the coordinates of points in a D dimensional polytope.
+ sample : (N, D) array, or (D, N) array_like
+ The data to be histogrammed.
+
+ Note the unusual interpretation of sample when an array_like:
+
+ * When an array, each row is a coordinate in a D-dimensional space -
+ such as ``histogramgramdd(np.array([p1, p2, p3]))``.
+ * When an array_like, each element is the list of values for single
+ coordinate - such as ``histogramgramdd((X, Y, Z))``.
+
+ The first form should be preferred.
+
bins : sequence or int, optional
The bin specification: