Can someone explain exactly what the axis parameter in NumPy does?
axis
I am terribly confused.
I\'m trying to use the function myArray.sum(ax
myArray.sum(ax
Clearly,
e.shape == (3, 2, 2)
Sum over an axis is a reduction operation so the specified axis disappears. Hence,
e.sum(axis=0).shape == (2, 2) e.sum(axis=1).shape == (3, 2) e.sum(axis=2).shape == (3, 2)