Now join them side by side, so the result is (2, 4)

NumPy · from Joining and splitting arrays

np.concatenatenp.stacknp.vstacknp.hstacknp.splitnp.tilenp.repeat

Putting the kettle on…

Starting up…

Exercise 2

Now join them side by side, so the result is (2, 4).

your answer
stuck? the lesson behind it
Joining and splitting arrays
concatenate extends an axis; stack creates one. Everything else is shorthand.