adam.pytorch.torch_like#
Classes#
Class wrapping pyTorch types |
|
Generic factory. Give it (a) a Like class and (b) an xp namespace |
|
A drop-in SpatialMath that implements sin/cos/outer/concat/skew with the Array API. |
Module Contents#
- class adam.pytorch.torch_like.TorchLike[source]#
Bases:
adam.core.array_api_math.ArrayAPILikeClass wrapping pyTorch types
- class adam.pytorch.torch_like.TorchLikeFactory(spec: adam.core.array_api_math.ArraySpec | None = None)[source]#
Bases:
adam.core.array_api_math.ArrayAPIFactoryGeneric factory. Give it (a) a Like class and (b) an xp namespace (array_api_compat.* if available; otherwise the library module).
- class adam.pytorch.torch_like.SpatialMath(spec: adam.core.array_api_math.ArraySpec | None = None)[source]#
Bases:
adam.core.array_api_math.ArrayAPISpatialMathA drop-in SpatialMath that implements sin/cos/outer/concat/skew with the Array API.
Works for NumPy, PyTorch, and JAX; CasADi should keep its own subclass.
- solve(A: adam.core.array_api_math.ArrayAPILike, B: adam.core.array_api_math.ArrayAPILike) adam.core.array_api_math.ArrayAPILike[source]#
Override solve to use torch.linalg.solve directly to avoid array_api_compat bug