numpy 1.22.4 Pypi GitHub Homepage
Other Docs
NotesParametersReturns
column_stack(*args, **kwargs)

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.

Notes

The function is applied to both the _data and the _mask, if any.

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 :

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/ma/extras.py#None
type: <class 'numpy.ma.extras._fromnxfunction_seq'>
Commit: