split array python code example
Example 1: numpy split
"1-D Array For example, [2, 3] would, for axis=0, result in
ary[:2]
ary[2:3]
ary[3:]
Example 2: python split array
>>> x = np.arange(9.0)
>>> np.split(x, 3)
[array([0., 1., 2.]), array([3., 4., 5.]), array([6., 7., 8.])]