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

Method __getitem__

numpy_ml/rl_models/rl_utils.py:53–56  ·  view source on GitHub ↗

Return the value associated with key

(self, key)

Source from the content-addressed store, hash-verified

51 self._model[(s, a)][(r, s_)] = value
52
53 def __getitem__(self, key):
54 """Return the value associated with key"""
55 s, a, r, s_ = key
56 return self._model[(s, a)][(r, s_)]
57
58 def __contains__(self, key):
59 """True if EnvModel contains `key`, else False"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected