PeakToPeak¶
Running peak to peak (max - min).
Attributes¶
- name
Examples¶
from river import stats
X = [1, -4, 3, -2, 2, 4]
ptp = stats.PeakToPeak()
for x in X:
ptp.update(x)
print(ptp.get())
0.
5.
7.
7.
7.
8.
Methods¶
get
Return the current value of the statistic.
update
Update the called instance.
Parameters
- x — 'numbers.Number'