def fun_ndarray(): a = [[1,2,7], [-6,-2,-3], [-4,-8,-55] ] b = [3,5,6] a = np.array(a) b = np.array(b) a_b_column = np.column_stack((a,b))#左右根据列拼接 a_b_row = np.row_stack((a,b))#上下按照行拼接 print('a_b_column') print(a_b_column) print('a_b_row') print(a_b_