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

Function avg

pattern/text/__init__.py:1487–1488  ·  view source on GitHub ↗
(list)

Source from the content-addressed store, hash-verified

1485RE_SYNSET = re.compile(r"^[acdnrv][-_][0-9]+$")
1486
1487def avg(list):
1488 return sum(list) / float(len(list) or 1)
1489
1490class Score(tuple):
1491

Callers 2

test_sentiment_avgMethod · 0.90
__call__Method · 0.70

Calls 2

sumFunction · 0.85
lenFunction · 0.85

Tested by 1

test_sentiment_avgMethod · 0.72