types.core.ArrayLike
types.core.ArrayLike
Array-like type supporting multiple backends.
Can be NumPy array, PyTorch tensor, or JAX array. Use this for maximum flexibility across backends.
Shape conventions: - Scalars: () - Vectors: (n,) - Matrices: (m, n) - Batched: (batch, …)
Examples
>>> def process(data: ArrayLike) -> ArrayLike:
... # Works with all backends
... return data * 2