import numpy as np matrix=np.ones((10,10)) print(matrix.sum(axis=0)) print(matrix.sum(axis=1))

**Here is what the above code is Doing:**

1. We created a matrix of size 10×10 with all elements as 1.

2. We then took the sum of all elements along the columns.

3. We then took the sum of all elements along the rows.