MCPcopy Index your code
hub / github.com/clips/pattern / avg

Function avg

pattern/db/__init__.py:336–340  ·  view source on GitHub ↗

Returns the arithmetic mean of the given list of values. For example: mean([1,2,3,4]) = 10/4 = 2.5.

(list)

Source from the content-addressed store, hash-verified

334_order = order
335
336def avg(list):
337 """ Returns the arithmetic mean of the given list of values.
338 For example: mean([1,2,3,4]) = 10/4 = 2.5.
339 """
340 return float(_sum(list)) / (len(list) or 1)
341
342def variance(list):
343 """ Returns the variance of the given list of values.

Callers 2

varianceFunction · 0.70
groupMethod · 0.70

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected