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:52
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 — Type: tuple[int, Ellipsis]
-
strides — Type: tuple[int, Ellipsis]
-
offset_bytes — Type: int
Methods
- __init__ —
Properties
- ndim — Return the rank encoded by the layout.