summaryrefslogtreecommitdiff
path: root/numpy/lib/index_tricks.py
diff options
context:
space:
mode:
authorPhilipp A <flying-sheep@web.de>2017-02-22 12:43:56 +0100
committerPhilipp A <flying-sheep@web.de>2017-02-22 15:54:29 +0100
commitc5de3222fa801e4a4e425116d4157cf1abb6813f (patch)
tree60215ea20adf7cb581717bf2ada16c31ccbccd0a /numpy/lib/index_tricks.py
parent85cd7b7e1ef04a498dbb84fc7d7fb35881a73183 (diff)
downloadnumpy-c5de3222fa801e4a4e425116d4157cf1abb6813f.tar.gz
DOC: Added more common example for np.c_
I mostly use that object to bind 1D arrays as columns, so I added an example for that use case.
Diffstat (limited to 'numpy/lib/index_tricks.py')
-rw-r--r--numpy/lib/index_tricks.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py
index 84c161b2e..7df51a862 100644
--- a/numpy/lib/index_tricks.py
+++ b/numpy/lib/index_tricks.py
@@ -468,6 +468,10 @@ class CClass(AxisConcatenator):
Examples
--------
+ >>> np.c_[np.array([1,2,3]), np.array([4,5,6])]
+ array([[1, 4],
+ [2, 5],
+ [3, 6]])
>>> np.c_[np.array([[1,2,3]]), 0, 0, np.array([[4,5,6]])]
array([[1, 2, 3, 0, 0, 4, 5, 6]])