import numpy as np a = np.array([[1,2],[3,4]]) sumo = np.sum(a,axis=0) suml = np.sum(a,axis=O) print(sumo) print(suml)