import numpy as np A = np.array([1,1,1])[:,np.newaxis] B = np.array([2,2,2])[:,np.newaxis] #合并 C = np.vstack((A,B)) D = np.hstack((A,B)) #0,1纵横 E =np.concatenate((A,B,B,A),axis=0) print(E) print(C) print(D) print(A.shape,C.shape) print(A.shape,D.shap…