Mean of arrays

Report a typo

You have an array array = np.array([[[7, 8], [13, 9]], [[9, 5], [15, 14]]]). Read the index of the axis from the input and print the mean of the array along this axis.

Sample Input 1:

0

Sample Output 1:

[[ 8.   6.5]
 [14.  11.5]]
Write a program in Python 3
import numpy as np


array = np.array([[[7, 8], [13, 9]], [[9, 5], [15, 14]]])
___

Create a free account to access the full topic