MCPcopy Index your code
hub / github.com/python/cpython / _fail_neg

Function _fail_neg

Lib/statistics.py:1643–1648  ·  view source on GitHub ↗

Iterate over values, failing if any are less than zero.

(values, errmsg='negative value')

Source from the content-addressed store, hash-verified

1641
1642
1643def _fail_neg(values, errmsg='negative value'):
1644 """Iterate over values, failing if any are less than zero."""
1645 for x in values:
1646 if x < 0:
1647 raise StatisticsError(errmsg)
1648 yield x
1649
1650
1651def _rank(data, /, *, key=None, reverse=False, ties='average', start=1) -> list[float]:

Callers 1

harmonic_meanFunction · 0.85

Calls 1

StatisticsErrorClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…