close
In Python, if we want to multiple 2 list elements into 1 list, we have to use +. But, if we use + in numpy, it will give us the sum of the list.
It’s quite simple to stack in Numpy. There are two functions for us to stack list, np.hstack() and np.vstack(). Be sure to remember vertical and horizontal, np.vstack() operate axis 0 and np.hstack() operate axis 1. No need to learn 3 dimensions in case you’ll mess up all of this.
文章標籤
全站熱搜