vstack, hstack

3次元以上の配列でaxis=2などについて結合するには,reshapeを併用すればできる.

ただし配列が非常に大きい場合には,zerosでメモリを確保して適宜な配列要素範囲に代入していく方が,メモリの負担が小さくかつ高速かもしれない.

多次元の配列を結合する.vstackはaxis=0, hstackはaxis=1で結合する.v, hが頭についているのは,2次元配列の場合axis=0が画面の縦方向,axis=1が画面の水平方向に表示されるためである.

combined multi-dimensional numpy array. vstack combine in the axis=0 direction and hstack combines in the axis=1 direction. The first character v and h stands for that axis=0 and axis=1 are shown in the vertical and horizontal directions of the screen for a 2-rank array.