1 import numpy as np 2 3 a = np.array([1, 2,0]) 4 b = np.array([4, 5,6]) 5 c = np.hstack((a, b)) #将两个数组按列放到一起 6 d = np.vstack((a, b)) #将两个数组按行放到一起 7 print("c: ", c) 8 print("d: ", d)