tvm_ffi.Map#
- class tvm_ffi.Map(input_dict)[source]#
-
Map container.
tvm_ffi.convert()will map python dict to this class.- Parameters:
input_dict (
Mapping[TypeVar(K),TypeVar(V)]) – The dictionary of values to be stored in the map.
See also
Examples
import tvm_ffi amap = tvm_ffi.convert({"a": 1, "b": 2}) assert isinstance(amap, tvm_ffi.Map) assert len(amap) == 2 assert amap["a"] == 1 assert amap["b"] == 2
Methods
__ffi_init__(*args)Defined in
Objectas method__ffi_init__().__init__(input_dict)Construct a Map from a Python mapping.
get(key[, default])Get an element with a default value.
items()Get the items from the map.
keys()Return a dynamic view of the map's keys.
same_as(other)values()Return a dynamic view of the map's values.