numpy 1.22.4 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
column_stack(tup)

Take a sequence of 1-D arrays and stack them as columns to make a single 2-D array. 2-D arrays are stacked as-is, just like with hstack . 1-D arrays are turned into 2-D columns first.

Parameters

tup : sequence of 1-D or 2-D arrays.

Arrays to stack. All of them must have the same first dimension.

Returns

stacked : 2-D array

The array formed by stacking the given arrays.

Stack 1-D arrays as columns into a 2-D array.

See Also

concatenate
hstack
stack
vstack

Examples

>>> a = np.array((1,2,3))
... b = np.array((2,3,4))
... np.column_stack((a,b)) array([[1, 2], [2, 3], [3, 4]])
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

numpy.hstack skimage.measure.fit.ransac numpy.lib.index_tricks.CClass numpy.ma.extras.dstack numpy.dstack numpy.ma.extras.hstack numpy.block numpy.concatenate numpy.core._multiarray_umath.concatenate numpy.vstack numpy.ma.extras.vstack

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /numpy/lib/shape_base.py#612
type: <class 'function'>
Commit: