121
vstack sure is an option, but a more straightforward solution for your case could be the hstack:
a = array([1,3,5])
b = array([2,4,6])
hstack((a,b)) # Remember it is a tuple of arrays that this function swallows in.
array([1, 3, 5, 2, 4, 6])
sort(hstack((a,b)))
array([1, 2, 3, 4, 5, 6])
And more importantly this works for arbitrary shapes of a and b.
Also you may want to try out dstack:
a = array([1,3,5])
b = array([2,4,6])
dstack((a,b)).flatten()
array([1, 2, 3, 4, 5, 6])
You’ve got options now!