class_docstr: Running peak to peak (max - min).
  
  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.
class_docstr_tok: ["Running","peak","to","peak","(","max","-","min",")",".","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","."]
code: def update(self, x):
      self._ptp.update(x)
      if not self._is_updated:
          self._is_updated = True
  
file_path: river/river/stats/ptp.py
imports: from __future__ import annotations
  from river import stats
  from river.stats import _rust_stats
label_desc: Use image node_id 3 for calling the PeakToPeak obj's underlying member method code with example usage: obj.update(x) without return types