split
Split an array into multiple equal-length sub-arrays along an axis. WhenindicesOrSections is an integer, the array must be evenly divisible along that axis (use array_split for unequal splits). Returns views into the original array.
Returns:
NDArray[] — List of sub-arrays as views.
array_split
Split an array into multiple sub-arrays. Unlikesplit, array_split allows splitting into sections of unequal size when the axis length is not evenly divisible. Returns views.
Returns:
NDArray[] — List of sub-arrays as views.
hsplit
Split an array horizontally (column-wise). For 1-D arrays, splits along axis 0. For 2-D and higher, splits along axis 1. Returns views.
Returns:
NDArray[] — List of sub-arrays.
vsplit
Split an array vertically (row-wise) along axis 0. The input must have at least 2 dimensions. Returns views.
Returns:
NDArray[] — List of sub-arrays.
dsplit
Split an array depth-wise (along the third axis). The input must have at least 3 dimensions. Returns views.
Returns:
NDArray[] — List of sub-arrays.
unstack
Unstack an array along an axis, producing a list of arrays each with one fewer dimension. This is the inverse ofstack.
Returns:
NDArray[] — List of sub-arrays with the specified axis removed.