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

Method __setitem__

numpy_ml/utils/data_structures.py:495–500  ·  view source on GitHub ↗
(self, key, value)

Source from the content-addressed store, hash-verified

493 self._id_max = 0
494
495 def __setitem__(self, key, value):
496 if self._encoder is not None:
497 key = self._encoder(key)
498 elif not isinstance(key, Hashable):
499 key = tuple(key)
500 super(Dict, self).__setitem__(key, value)
501
502 def _encode_key(self, key):
503 D = super(Dict, self)

Callers 1

_encode_keyMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected