Skip to main content

Module manipulation

Module manipulation 

Source

Modules§

extended

Functions§

array_split
Split an array into sub-arrays at the given indices along axis.
block
Assemble an array from nested blocks.
broadcast_to
Broadcast an array to a new shape (returns a new owned array).
concatenate
Join a sequence of arrays along an existing axis.
dsplit
Split array along axis 2 (depth split). Equivalent to split(a, n, 2).
dstack
Stack arrays along the third axis (depth-wise).
expand_dims
Insert a new axis of length 1 at the given position.
flatten
Return a flattened (1-D) copy of the array.
flip
Reverse the order of elements along the given axis.
fliplr
Flip array left-right (reverse axis 1).
flipud
Flip array up-down (reverse axis 0).
hsplit
Split array along axis 1 (horizontal split). Equivalent to split(a, n, 1).
hstack
Stack arrays horizontally (column-wise). Equivalent to concatenate along axis 1 for 2-D+ arrays, or along axis 0 for 1-D arrays.
moveaxis
Move an axis to a new position.
ravel
Return a flattened (1-D) copy of the array.
reshape
Reshape an array to a new shape (returns a new owned array).
roll
Roll elements along an axis. Elements that roll past the end are re-introduced at the beginning.
rollaxis
Roll an axis to a new position (similar to moveaxis).
rot90
Rotate array 90 degrees counterclockwise in the plane defined by axes (0, 1).
split
Split an array into equal-sized sub-arrays.
squeeze
Remove axes of length 1 from the shape.
stack
Join a sequence of arrays along a new axis.
swapaxes
Swap two axes of an array.
transpose
Permute the axes of an array.
vsplit
Split array along axis 0 (vertical split). Equivalent to split(a, n, 0).
vstack
Stack arrays vertically (row-wise). Equivalent to concatenate along axis 0 for 2-D+ arrays, or equivalent to stacking 1-D arrays as rows.