axis

http://blog.csdn.net/rango_lhl/article/details/50542887

In [52]: arr=np.arange(12).reshape((3,4))
In [53]:arr
Out[53]:
array([[ 0,  1,  2,  3],
       [ 4,  5,  6,  7],
       [ 8,  9, 10, 11]])
In [54]:np.concatenate([arr,arr],axis=0)
Out[54]:
array([[ 0,  1,  2,  3],
       [ 4,  5,  6,  7],
       [ 8,  9, 10, 11],
       [ 0,  1,  2,  3],
       [ 4,  5,  6,  7],
       [ 8,  9, 10, 11]])
In [55]:np.concatenate([arr,arr],axis=1)
Out[55]:
array([[ 0,  1,  2,  3,  0,  1,  2,  3],
       [ 4,  5,  6,  7,  4,  5,  6,  7],
       [ 8,  9, 10, 11,  8,  9, 10, 11]])
axis_第1张图片
axis_第2张图片

你可能感兴趣的:(axis)