tvm_ffi.Shape#
- class tvm_ffi.Shape(content)[source]#
Bases:
tuple,PyNativeObjectShape tuple that represents
tvm::ffi::Shapereturned by an FFI call.Notes
This class subclasses
tupleso it can be used in most places wheretupleis used in Python array APIs.Examples
import numpy as np import tvm_ffi x = tvm_ffi.from_dlpack(np.arange(6, dtype="int32").reshape(2, 3)) assert x.shape == (2, 3)
- __init__()#