adam.numpy.numpy_like#

Classes#

NumpyLike

Class wrapping NumPy types

NumpyLikeFactory

Generic factory. Give it (a) a Like class and (b) an xp namespace

SpatialMath

A drop-in SpatialMath that implements sin/cos/outer/concat/skew with the Array API.

Module Contents#

class adam.numpy.numpy_like.NumpyLike[source]#

Bases: adam.core.array_api_math.ArrayAPILike

Class wrapping NumPy types

array: numpy.ndarray[source]#
class adam.numpy.numpy_like.NumpyLikeFactory(spec: adam.core.array_api_math.ArraySpec | None = None)[source]#

Bases: adam.core.array_api_math.ArrayAPIFactory

Generic factory. Give it (a) a Like class and (b) an xp namespace (array_api_compat.* if available; otherwise the library module).

class adam.numpy.numpy_like.SpatialMath(spec: adam.core.array_api_math.ArraySpec | None = None)[source]#

Bases: adam.core.array_api_math.ArrayAPISpatialMath

A 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.