📜  np.hstack - Python 代码示例

📅  最后修改于: 2022-03-11 14:46:06.748000             🧑  作者: Mango

代码示例3
>>> a = np.array((1,2,3))
>>> b = np.array((2,3,4))
>>> np.hstack((a,b))
array([1, 2, 3, 2, 3, 4])
>>> a = np.array([[1],[2],[3]])
>>> b = np.array([[2],[3],[4]])
>>> np.hstack((a,b),columns=['hurala','panalal'])
array([[1, 2],
       [2, 3],
       [3, 4]])