There is a new array in the code: array = np.array([[[13, 14], [34, 35]], [[9, 9], [5, 0]]]). Read the index of the axis from the input and print the sum of values in the array along this axis.
Operations with an array
Sum of arrays
Report a typo
Sample Input 1:
0Sample Output 1:
[[22 23]
[39 35]]Write a program in Python 3
import numpy as np
array = np.array([[[13, 14], [34, 35]], [[9, 9], [5, 0]]])
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.