(iterable)
| 240 | found_zero = False |
| 241 | |
| 242 | def count_positive(iterable): |
| 243 | nonlocal n, found_zero |
| 244 | for n, x in enumerate(iterable, start=1): |
| 245 | if x > 0.0 or math.isnan(x): |
| 246 | yield x |
| 247 | elif x == 0.0: |
| 248 | found_zero = True |
| 249 | else: |
| 250 | raise StatisticsError('No negative inputs allowed', x) |
| 251 | |
| 252 | total = fsum(map(log, count_positive(data))) |
| 253 |
no test coverage detected
searching dependent graphs…