MCPcopy Create free account
hub / github.com/UX-Decoder/Semantic-SAM / __setitem__

Method __setitem__

utils/sam_utils/amg.py:29–33  ·  view source on GitHub ↗
(self, key: str, item: Any)

Source from the content-addressed store, hash-verified

27 self._stats = dict(**kwargs)
28
29 def __setitem__(self, key: str, item: Any) -> None:
30 assert isinstance(
31 item, (list, np.ndarray, torch.Tensor)
32 ), "MaskData only supports list, numpy arrays, and torch tensors."
33 self._stats[key] = item
34
35 def __delitem__(self, key: str) -> None:
36 del self._stats[key]

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected