Back to Numerical Arrays (NumPy)
np.hsplit
Split an array into multiple sub-arrays horizontally (column-wise).
Syntax
np.hsplit(arr, indices_or_sections)
Description
Split an array into multiple sub-arrays horizontally (column-wise).
Parameters
| Name | Description |
|---|---|
| arr | - Array |
| indices_or_sections | - Number of sections or split indices |
Returns
NDArray[]