class_docstr: Running peak to peak (max - min) over a window.
  
  Parameters
  ----------
  window_size
      Size of the rolling window.
  
  Attributes
  ----------
  max : stats.RollingMax
      The running rolling max.
  min : stats.RollingMin
      The running rolling min.
  
  Examples
  --------
  
  >>> from river import stats
  
  >>> X = [1, -4, 3, -2, 2, 1]
  >>> ptp = stats.RollingPeakToPeak(window_size=2)
  >>> for x in X:
  ...     ptp.update(x)
  ...     print(ptp.get())
  0
  5
  7
  5
  4
  1
class_docstr_tok: ["Running","peak","to","peak","(","max","-","min",")","over","a","window",".","Parameters","--","--","--","--","--","window_size","Size","of","the","rolling","window",".","Attributes","--","--","--","--","--","max",":","stats.RollingMax","The","running","rolling","max",".","min",":","stats.RollingMin","The","running","rolling","min",".","Examples","--","--","--","--",">",">",">","from","river","import","stats",">",">",">","X","=","[","1",",","-4",",","3",",","-2",",","2",",","1","]",">",">",">","ptp","=","stats.RollingPeakToPeak","(","window_size=2",")",">",">",">","for","x","in","X",":","...","ptp.update","(","x",")","...","print","(","ptp.get","(",")",")","0","5","7","5","4","1"]
code: def window_size(self):
      return self.max.window_size
  
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 2 for calling the RollingPeakToPeak obj's underlying member method code with example usage: obj.window_size() and returns: self