I am starting with NumPy.
Given two np.arrays, 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?
It's not completely clear to me how you've set up your
arrays, but from the sound of it,np.vstackshould indeed do what you are look for: