MCPcopy Create free account
hub / github.com/OpenMeshLab/MeshXL / __init__

Method __init__

utils/misc.py:45–51  ·  view source on GitHub ↗
(self, window_size=20, fmt=None)

Source from the content-addressed store, hash-verified

43 """
44
45 def __init__(self, window_size=20, fmt=None):
46 if fmt is None:
47 fmt = "{median:.4f} ({global_avg:.4f})"
48 self.deque = deque(maxlen=window_size)
49 self.total = 0.0
50 self.count = 0
51 self.fmt = fmt
52
53 def update(self, value, n=1):
54 self.deque.append(value)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected