Skip to main content

NumPy Stack


In this tutorial you will learn:

  • What is NumPy Stack function and its uses?
  • Results of hstack on 1D, 2D and 3D arrays
  • Results of vstack on 1D, 2D and 3D arrays
  • Results of dstack on 1D, 2D and 3D arrays

NumPy Stack Function

Just like concatenate function, stack function is another function for joining or concatenation of the arrays but with a main difference between them is that the stacking is always done along a new axis. If the concatenation has to be done along the same axis, it is better to use concatenate function. There are 4 types of stack functions

  • Plain Stack

Add new comment