import numpy as np
//等量分割
A = np.arange(12).reshape((3,4))
//横向分割
//或:print(np.vsplit(A,2))
//输出:
[array([[0, 1, 2, 3]]), array([[4, 5, 6, 7]]), array([[ 8, 9, 10, 11]])]
print(np.split(A,3,axis=0))
//纵向分割
//输出:
[array([[0, 1],
[4, 5],
[8, 9]]), array([[ 2, 3],
[ 6, 7],
[10, 11]])]
print(np.split(A,2,axis=1))
//不等量分割
//输出:
[array([[0, 1, 2, 3],
[4, 5, 6, 7]]), array([[ 8, 9, 10, 11]])]
print(np.array_split(A,3,axis=0))