split
Split an array into multiple sub-arrays as views into the original array.Array to be divided into sub-arrays.
If an integer, N, the array will be divided into N equal arrays along
axis. If such a split is not possible, an error is raised.If a 1-D array of sorted integers, the entries indicate where along axis the array is split. For example, [2, 3] would result in:ary[:2]ary[2:3]ary[3:]
The axis along which to split, default is 0.
list of ndarrays - A list of sub-arrays as views into ary.
Examples
See Also
array_split- Split array into multiple sub-arrays of equal or near-equal sizehsplit- Split array horizontallyvsplit- Split array verticallydsplit- Split array along the 3rd axis
array_split
Split an array into multiple sub-arrays.Array to be divided into sub-arrays.
If an integer that does not equally divide the axis, the first
l % n sub-arrays will have size l//n + 1, and the rest will have size l//n.The axis along which to split, default is 0.
list of ndarrays - A list of sub-arrays as views into ary.
Examples
See Also
split- Split array into multiple sub-arrays of equal size
hsplit
Split an array into multiple sub-arrays horizontally (column-wise).Array to be divided into sub-arrays.
If an integer, N, the array will be divided into N equal arrays along axis 1 (or axis 0 for 1-D arrays). If a 1-D array of sorted integers, the entries indicate where to split the array.
list of ndarrays - A list of sub-arrays as views into ary.
Examples
See Also
split- Split array into multiple sub-arrays of equal size
vsplit
Split an array into multiple sub-arrays vertically (row-wise).Array to be divided into sub-arrays. Must be at least 2-D.
If an integer, N, the array will be divided into N equal arrays along axis 0. If a 1-D array of sorted integers, the entries indicate where to split the array.
list of ndarrays - A list of sub-arrays as views into ary.
Examples
See Also
split- Split array into multiple sub-arrays of equal size
dsplit
Split array into multiple sub-arrays along the 3rd axis (depth).Array to be divided into sub-arrays. Must be at least 3-D.
If an integer, N, the array will be divided into N equal arrays along axis 2. If a 1-D array of sorted integers, the entries indicate where to split the array.
list of ndarrays - A list of sub-arrays as views into ary.
Examples
See Also
split- Split array into multiple sub-arrays of equal sizehsplit- Split array horizontallyvsplit- Split array vertically
