division du tableau nu
x = np.arange(8.0)
np.array_split(x, 3)
# returns [array([0., 1., 2.]), array([3., 4., 5.]), array([6., 7.])]
Excited Eel
x = np.arange(8.0)
np.array_split(x, 3)
# returns [array([0., 1., 2.]), array([3., 4., 5.]), array([6., 7.])]
# welcome to softhunt.net
# import numpy
import numpy as np
array = [[1, 2, 3],
[4, 5, 6],
[7, 8, 9]]
# using numpy.split() method
softhunt = np.split(array, [3, 5, 6, 10])
print(softhunt)
numpy.array_split()
numpy.split(ary, indices_or_sections, axis=0)