xxxxxxxxxx
#In numpy, with a 2-dimensional NumPy array, the axes are the directions
#along the rows and columns.
# Such Axis 0 is :
# rwo 0;
# rwo 1;
# rwo 2;
# ...
# and Axis 1 is :
# columns 0;
# columns 1;
# columns 2;
# ...
# Therefore, 3-dimensional Axis 2 is (Deepwise):
# depth 0
# depth 1
# depth 2
# ...
xxxxxxxxxx
import numpy as np
# Sample 2D array
arr = np.array([[1, 2, 3],
[4, 5, 6]])
column_sum = np.sum(arr, axis=0)
print(column_sum)