API reference
python:astx:astx.TensorView
class TensorView
TensorView(base: astx.AST, *, shape: Sequence[int], strides: Sequence[int] | None = None, offset_bytes: int = 0)
Source: packages/astx/src/astx/tensor.py:175
Declared as: python:astx:astx.tensor.TensorView
Internal Tensor view node.
Build one shallow tensor view by reusing the base storage and replacing the logical shape, strides, and offset metadata.
Attributes
-
base — Type: astx.AST
-
shape — Type: tuple[int, Ellipsis]
-
strides — Type: tuple[int, Ellipsis] | None
-
offset_bytes — Type: int
-
type_ — Type: TensorType
Methods
-
__init__ — Initialize one Tensor view.
-
get_struct — Return the structured representation of the Tensor view.