geometrical mean python

Solutions on MaxInterview for geometrical mean python by the best coders in the world

showing results for - "geometrical mean python"
Camila
19 Feb 2018
1import numpy as np
2
3def geo_mean(iterable):
4    a = np.array(iterable)
5    return a.prod()**(1.0/len(a))