According to NumPy's glossary, the row axis is 0, and the column axis is 1. Therefore, the answer of
Given the X NumPy matrix, show the sum of its columns should be
X.sum(axis=1) not X.sum(axis=0)
One can try to add the columns to check, the answer is the result of X.sum(axis=1)
Although the answer for the next problem is correct (it does compute the mean values of the elements of X's row), the given comment is still incorrect (# remember: axis=0 columns; axis=1 rows)