i have an array [[[1],[2]]] and i want to add [3] to get [[[1],[2],[3]]]
what i've tried so far
my_array = numpy.array([[[1],[2]]])
print(my_array.shape, my_array)
to_append = numpy.array([3])
print(to_append.shape, to_append)
# i want [[[1],[2],[3]]]
my_array[0] = numpy.append(my_array[0], to_append)
but i get
ValueError: could not broadcast input array from shape (3) into shape (2,1)