API reference
python:irx:irx.builtins.collections.tensor.TensorLayout
class TensorLayout
TensorLayout(shape: tuple[int, ...], strides: tuple[int, ...], offset_bytes: int = 0)
Source: packages/irx/src/irx/builtins/collections/tensor.py:51
Static Tensor layout metadata.
Represent the logical rank, shape, strides, and byte offset of one Tensor value without duplicating the lower-level storage machinery.
Attributes
-
shape — Declared dimensions or result shape.; Type: tuple[int, ...]
-
strides — Strides.; Type: tuple[int, ...]
-
offset_bytes — Offset bytes.; Type: int
-
ndim — Ndim.; Type: int
Methods
- __init__ —
Properties
- ndim — Return the rank encoded by the layout.