MCPcopy Create free account
hub / github.com/DanielShalam/BPA / __init__

Method __init__

utils.py:296–302  ·  view source on GitHub ↗
(self, window_size=20, fmt=None)

Source from the content-addressed store, hash-verified

294 """
295
296 def __init__(self, window_size=20, fmt=None):
297 if fmt is None:
298 fmt = "{median:.6f} ({global_avg:.6f})"
299 self.deque = deque(maxlen=window_size)
300 self.total = 0.0
301 self.count = 0
302 self.fmt = fmt
303
304 def update(self, value, n=1):
305 self.deque.append(value)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected