Q:

numpy mean

>>> import numpy
>>> numbers = [3, 2, 8, 7]
>>> mean = numpy.mean(numbers)
>>> mean
5.0
1
>> import numpy as np 
>> a=[1,2,3,4,5]
>> np.mean(a)
3.0
1
# define ndarray a
a = np.array([[1, 2], [3, 4]])
# get the mean 
np.mean(a, axis=None)
0

New to Communities?

Join the community