The return value of the array_split()
method is an array where each split is stored as a sub-array.
If you divide an array into 3 parts, you can access each part from the result just like you would with any array element.
Access the split arrays:
import numpy as np arr = np.array([1, 2, 3, 4, 5, 6]) newarr = np.array_split(arr, 3) print(newarr[0]) print(newarr[1]) print(newarr[2]) |