MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _fail_neg

Function _fail_neg

tools/python-3.11.9-amd64/Lib/statistics.py:351–356  ·  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

349
350
351def _fail_neg(values, errmsg='negative value'):
352 """Iterate over values, failing if any are less than zero."""
353 for x in values:
354 if x < 0:
355 raise StatisticsError(errmsg)
356 yield x
357
358
359def _integer_sqrt_of_frac_rto(n: int, m: int) -> int:

Callers 1

harmonic_meanFunction · 0.85

Calls 1

StatisticsErrorClass · 0.85

Tested by

no test coverage detected