Numpy axes are the directions along the rows and columns.

Numpy Axes-20251011161119106.png

In a 2D NumPy array, the axes are the directions along the rows and cols.

  • Axis 0 is the direction along the rows
  • Axis 1 is the direction along the columns

np.sum()

NumPy Axes-20251011164922907.png

NumPy Axes-20251011164940265.png

np.concanate()