Array§
- class typed_lisa_toolkit.types.misc.Array[DTypeT_co, NamespaceT_co][source]§
An array from any array library supporting the Python Array API standard.
Currently, Numpy, JAX, and PyTorch backends have been tested at runtime. In principle, any array library that implements the Python Array API standard should be compatible.
The static type annotation for the arrays is for the moment limited due to the premature state of data-array-typing. As a consequence, all output arrays are merged into a single type, Array[Any, ModuleType], and a static type checker may not be able to infer the specific array type (e.g., npt.NDArray[np.float64]). If needed, you may help the type checker by casting or by using xp.asarray to ensure the correct type is inferred.