tvm_ffi.Array

tvm_ffi.Array#

class tvm_ffi.Array(input_list)[source]#

Bases: Object, Sequence[T]

Array container that represents a sequence of values in ffi.

tvm_ffi.convert() will map python list/tuple to this class.

Parameters:

input_list (Iterable[T]) – The list of values to be stored in the array.

Examples

import tvm_ffi

a = tvm_ffi.convert([1, 2, 3])
assert isinstance(a, tvm_ffi.Array)
assert len(a) == 3
__init__(input_list)[source]#

Construct an Array from a Python sequence.

Parameters:

input_list (Iterable[T])

Return type:

None

Methods

__init__(input_list)

Construct an Array from a Python sequence.

count(value)

index(value, [start, [stop]])

Raises ValueError if the value is not present.

same_as(other)

Check object identity.