I have the following code. I want to append numpy ndarrays to an empty array. But I am not getting the required output. How can I get the output I want?
a = np.array([1,2,3])
b = np.array([2,3,4,5])
c = np.array([1,2])
p = np.array([])
p = np.append(p, a)
p = np.append(p, b)
p = np.append(p, c)
p.shape
# actual output: (9,)
# output I want: (3,?)
p[0]
# output: 1.0
# output I want: [1,2,3]