A grid has rows for nights and columns for sensors. With no axis argument, np.sum(grid) adds every cell into one total. An axis lets you keep separate totals for one dimension.
For shape (2, 3), axis 0 is the two-row dimension and axis 1 is the three-column dimension. A reduction removes the dimension you name:
axis=0 adds down the nights, leaving three sensor totals, shape (3,).axis=1 adds across the sensors, leaving two night totals, shape (2,).Read the first night across: 2 + 5 + 3 gives 10. That is one output per row, so it is the column dimension, axis 1, that disappears.
night_totals from 0 to 1.Run main.py to see [10 11], then Submit.
For one result per night, reduce across that night’s sensor columns.