calculate mean in python using numpy code example
Example 1: numpy average
import numpy as np
a = np.arange(6).reshape(3,2)
average = np.average(a)
Example 2: calculate mean on python
def calculate_mean(n):
s = sum(n)
N = len(n)
mean = s / N
return mean