MCPcopy Create free account
hub / github.com/apache/tvm-ffi / __init__

Method __init__

python/tvm_ffi/container.py:674–681  ·  view source on GitHub ↗

Construct a Dict from a Python mapping.

(self, input_dict: Mapping[K, V] | None = None)

Source from the content-addressed store, hash-verified

672 return _ffi_api.DeepCopy(self)
673
674 def __init__(self, input_dict: Mapping[K, V] | None = None) -> None:
675 """Construct a Dict from a Python mapping."""
676 list_kvs: list[Any] = []
677 if input_dict is not None:
678 for k, v in input_dict.items():
679 list_kvs.append(k)
680 list_kvs.append(v)
681 self.__init_handle_by_constructor__(_ffi_api.Dict, *list_kvs)
682
683 def __getitem__(self, k: K) -> V:
684 """Return the value for key `k` or raise KeyError."""

Callers

nothing calls this directly

Calls 2

appendMethod · 0.80
itemsMethod · 0.45

Tested by

no test coverage detected