(h,v) represent (horizontal,vertical)

函数名h,v  代表 行和列 (horizontal,vertical)

numpy 中 hstack 表示横向拼接两个行数相同的数组

In [42]: np.hstack((arr3,arr4))

Out[42]:

array([[  0,   0,   0,   3,   1,   2,   3,   4],

[  5,   8,  13,  21,   5,   6,   7,   8],

[ 34,  55,  89, 144,   9,  10,  11,  12]])

numpy 中 vstack 表示纵向拼接两个列数相同的数组

In [43]: np.vstack((arr3,arr4))  

Out[43]:

array([[  0,   0,   0,   3],

[  5,   8,  13,  21],

[ 34,  55,  89, 144],

[  1,   2,   3,   4],

[  5,   6,   7,   8],

[  9,  10,  11,  12]])

原文地址:https://www.cnblogs.com/wawawawa-briefnote/p/8809415.html