MCPcopy Create free account
hub / github.com/google-deepmind/dm_control / __init__

Method __init__

dm_control/viewer/util.py:141–151  ·  view source on GitHub ↗

Instance initializer. Args: refresh_rate: How often, in seconds, is the integrated value averaged.

(self, refresh_rate=.5)

Source from the content-addressed store, hash-verified

139 """Integrates a value and averages it for the specified period of time."""
140
141 def __init__(self, refresh_rate=.5):
142 """Instance initializer.
143
144 Args:
145 refresh_rate: How often, in seconds, is the integrated value averaged.
146 """
147 self._value = 0
148 self._value_acc = 0
149 self._num_samples = 0
150 self._sampling_timestamp = time.time()
151 self._refresh_rate = refresh_rate
152
153 @property
154 def value(self):

Callers

nothing calls this directly

Calls 1

timeMethod · 0.45

Tested by

no test coverage detected