[numpy] ndarray.flatten(), ndarray.reshape(-1), np.concatenate(c, axis=0)二维数组变为一维数组
方法一:a.flatten()a=[[[1,2],3],[4,[5,6]],[7,8,9]]print(flatten(a))或a.flatten()注意该方法不能用于list类型,只能用在数组方法二:array.reshape(-1)numpy.array(a).reshape(n,n)a.reshape(-1)#-1代表不知后一列多少个,随前面选择的情况定out:[1,2,3,4,5,6,7,