numpy insert an element keeping number of array dimensions

Viewed 581

I have a numpy array like this:

[[1, 2, 3], [1, 2, 4]]

and I want to append an element [100, 101, 102] to the array like this:

[[1, 2, 3], [1, 2, 4], [100, 101, 102]]

I tried numpy.append but it creates a 1D array with all the elements. How can I do that?

2 Answers
Related