MCPcopy Create free account
hub / github.com/ddbourgin/numpy-ml / __setitem__

Method __setitem__

numpy_ml/rl_models/rl_utils.py:48–51  ·  view source on GitHub ↗

Set self[key] to value

(self, key, value)

Source from the content-addressed store, hash-verified

46 self._model = defaultdict(lambda: defaultdict(lambda: 0))
47
48 def __setitem__(self, key, value):
49 """Set self[key] to value"""
50 s, a, r, s_ = key
51 self._model[(s, a)][(r, s_)] = value
52
53 def __getitem__(self, key):
54 """Return the value associated with key"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected