From c5de3222fa801e4a4e425116d4157cf1abb6813f Mon Sep 17 00:00:00 2001 From: Philipp A Date: Wed, 22 Feb 2017 12:43:56 +0100 Subject: 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. --- numpy/lib/index_tricks.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'numpy/lib/index_tricks.py') 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]]) -- cgit v1.2.1