I am starting with NumPy.
Given two np.array
s, queu
and new_path
:
queu = [ [[0 0]
[0 1]]
]
new_p
It's not completely clear to me how you've set up your array
s, but from the sound of it, np.vstack
should indeed do what you are look for:
In [30]: queue = np.array([0, 0, 0, 1]).reshape(2, 2)
In [31]: queue
Out[31]:
array([[0, 0],
[0, 1]])
In [32]: new_path = np.array([0, 0, 1, 0, 2, 0]).reshape(3, 2)
In [33]: new_path
Out[33]:
array([[0, 0],
[1, 0],
[2, 0]])
In [35]: np.vstack((queue, new_path))
Out[35]:
array([[0, 0],
[0, 1],
[0, 0],
[1, 0],
[2, 0]])