![]() |
VOOZH | about |
numpy.array_split() method, we can get the splitted array of having different dimensions by using numpy.array_split() method.
Syntax : numpy.array_split()
Return : Return the splitted array of one dimension.
Example #1 :
In this example we can see that by using numpy.array_split() method, we are able to split the array in the number of subarrays by passing it as a parameter.
Output :
[array([0, 1, 2]), array([3, 4]), array([5, 6]), array([7, 8])]Example #2 :
[array([[1, 2, 3]]), array([[4, 5, 6]]), array([[7, 8, 9]])]