Define 2 arrays:
In [19]: a = np.array([[1,2], [3,4,5]])
In [20]: b = np.array([6,7,8,9])
In [21]: a
Out[21]: array([list([1, 2]), list([3, 4, 5])], dtype=object)
Since a is an array of lists, lets backtrack and define b as a list as well:
In [22]: b = [6,7,8,9]
An object array has few, if any advantages compared to a list. On big disadvantage is that it doesn't have an append method:
In [23]: a.tolist()
Out[23]: [[1, 2], [3, 4, 5]]
In [24]: alist = a.tolist()
In [25]: alist.append(b)
In [26]: np.array(alist)
Out[26]: array([list([1, 2]), list([3, 4, 5]), list([6, 7, 8, 9])], dtype=object)
While we can work out a way of making new array with 3 elements, I doubt if it will be any better than this list append.
When we try to concatenate, the b list is first turned into an array:
In [30]: np.concatenate([a,b])
Out[30]: array([list([1, 2]), list([3, 4, 5]), 6, 7, 8, 9], dtype=object)
In [31]: np.array(b)
Out[31]: array([6, 7, 8, 9])
So this joins the (2,) a with the (4,) b producing a (6,).
To do the concatenate that you want, we have to first wrap b in an similar object dtype array:
In [32]: c = np.array([None])
In [33]: c
Out[33]: array([None], dtype=object)
In [34]: c[0]=b
In [35]: c
Out[35]: array([list([6, 7, 8, 9])], dtype=object)
c is a (1,) object dtype, which pairs with the (2,) a as desired:
In [36]: np.concatenate((a,c))
Out[36]: array([list([1, 2]), list([3, 4, 5]), list([6, 7, 8, 9])], dtype=object)
This is effectively the same as your appending [0]:
In [40]: d = np.concatenate([a, [None]])
In [41]: d
Out[41]: array([list([1, 2]), list([3, 4, 5]), None], dtype=object)
In [42]: d[-1] = b
In [43]: d
Out[43]: array([list([1, 2]), list([3, 4, 5]), list([6, 7, 8, 9])], dtype=object)
One way or other you have to convert b into a single element array, not the 4 element Out[31]. concatenate joins arrays.
np.append. It is not a list append clone, so don't expect the same behavior. It is a cover fornp.concatenate, but first it will tweak the inputs (if you don't specifyaxis).ais an object dtype array. Expect some differences in behavior compared to working with a normal numeric array. In a sense there isn't a proper way of adding an element (especially an array or list) to an object array.ais itself isn't proper.