summaryrefslogtreecommitdiff
path: root/numpy/lib
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2017-02-22 22:40:59 +0000
committerGitHub <noreply@github.com>2017-02-22 22:40:59 +0000
commitf24da28e7bef4befa51354fff864bb7b5b3e07f9 (patch)
treec1419ce0ef0782d7c54277de500e160138fe3877 /numpy/lib
parent58d7c8cc7cb445ca3e5d4b650d738ea6476147ed (diff)
parent5e725ac3d50d1829a866273078e4a634b6b2b2cd (diff)
downloadpython-numpy-f24da28e7bef4befa51354fff864bb7b5b3e07f9.tar.gz
python-numpy-f24da28e7bef4befa51354fff864bb7b5b3e07f9.tar.bz2
python-numpy-f24da28e7bef4befa51354fff864bb7b5b3e07f9.zip
Merge pull request #8668 from flying-sheep/patch-1
DOC: Add more examples for np.c_
Diffstat (limited to 'numpy/lib')
-rw-r--r--numpy/lib/index_tricks.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py
index 84c161b2e..1fd530f33 100644
--- a/numpy/lib/index_tricks.py
+++ b/numpy/lib/index_tricks.py
@@ -463,11 +463,18 @@ class CClass(AxisConcatenator):
useful because of its common occurrence. In particular, arrays will be
stacked along their last axis after being upgraded to at least 2-D with
1's post-pended to the shape (column vectors made out of 1-D arrays).
-
- For detailed documentation, see `r_`.
+
+ See Also
+ --------
+ column_stack : Stack 1-D arrays as columns into a 2-D array.
+ r_ : For more detailed documentation.
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]])