a = np.array([1, 2, 3]) aa = np.array([1], [2], [3]) b = np.array([1, 2, 3]) bb = np.array([1], [2], [3]) np.concatenate((a, b), axis = 1) array([1, 2, 3, 1, 2, 3]) # It ok, that what I was expecting np.concatenate((a, b), axis = 0) array([1, 2, 3, 1, 2, 3]) # It not ok, that not what I was expecting
I expected:
array([[1, 2, 3], [1, 2, 3]])
even with aa and bb I get the same inconsistency. so is there a simple solution to combine two one-dimensional arrays along the 0 axis?
source share