1 min read

Numpy squeeze

Reduce the 3rd dimension of 3D-array to 2D

  • e.g. (5, 5, 1) => (5, 5)

Convenient for plotting using plt.imshow().