Numpy Sum Axis Intuition
I’ve always thought that axis 0 is rowwise, and 1 is columnwise.
rowwise (axis 0) > [[ 0 1]
[ 0 5]]
⭡

columnwise (axis 1)
However, the result of numpy.sum is the exact opposite of what I was thinking.
>>> np.sum([[0, 1], [0, 5]], axis=0)
array([0, 6])>>> np.sum([[0, 1], [0, 5]], axis=1)
array([1, 5])