NumPy stack or append array to array
问题 I am starting with NumPy. Given two np.array s, queu and new_path : queu = [ [[0 0] [0 1]] ] new_path = [ [[0 0] [1 0] [2 0]] ] My goal is to get the following queu : queu = [ [[0 0] [0 1]] [[0 0] [1 0] [2 0]] ] I've tried: np.append(queu, new_path, 0) and np.vstack((queu, new_path)) But both are raising all the input array dimensions except for the concatenation axis must match exactly I didn't get the NumPy philosophy. What am I doing wrong? 回答1: In [741]: queu = np.array([[[0,0],[0,1]]])