torchfilter.types

Data structures and semantic type aliases for filtering.

Module Contents

Classes

Trajectory

Named tuple containing states, observations, and controls.

TrajectoryNumpy

Named tuple containing states, observations, and controls represented in NumPy.

TrajectoryTorch

Named tuple containing states, observations, and controls represented in Torch.

torchfilter.types.NumpyDict

Dictionary from str keys to np.ndarray values.

torchfilter.types.TorchDict

Dictionary from str keys to torch.Tensor values.

torchfilter.types.NumpyArrayOrDict

Union of np.ndarray and NumpyDict types.

torchfilter.types.TorchTensorOrDict

Union of torch.Tensor and TorchDict types.

torchfilter.types.StatesNumpy

State array type hint. Needs to be a raw np.ndarray.

torchfilter.types.StatesTorch

State array type hint. Needs to be a raw torch.Tensor.

torchfilter.types.ObservationsNumpy

Observations can be either np.ndarray objects or str->np.ndarray dictionaries.

torchfilter.types.ObservationsTorch

Observations can be either torch.Tensor objects or str->torch.Tensor dictionaries.

torchfilter.types.ObservationsNoDictNumpy

Same as ObservationsNumpy, but no dictionaries.

torchfilter.types.ObservationsNoDictTorch

Same as ObservationsTorch, but no dictionaries.

torchfilter.types.ControlsNumpy

Controls can be either np.ndarray objects or str->np.ndarray dictionaries.

torchfilter.types.ControlsTorch

Controls can be either torch.Tensor objects or str->torch.Tensor dictionaries.

torchfilter.types.CovarianceTorch

Covariance matrix as torch.Tensor. Must be positive semi-definite.

torchfilter.types.ScaleTrilTorch

Lower-triangular cholesky decomposition of covariance matrix as torch.Tensor.

class torchfilter.types.Trajectory[source]

Bases: typing.NamedTuple

Inheritance diagram of torchfilter.types.Trajectory

Named tuple containing states, observations, and controls.

states :Union[StatesNumpy, StatesTorch]
observations :Union[ObservationsNumpy, ObservationsTorch]
controls :Union[ControlsNumpy, ControlsTorch]
class torchfilter.types.TrajectoryNumpy[source]

Bases: torchfilter.types.Trajectory

Inheritance diagram of torchfilter.types.TrajectoryNumpy

Named tuple containing states, observations, and controls represented in NumPy.

states :StatesNumpy
observations :ObservationsNumpy
controls :ControlsNumpy
class torchfilter.types.TrajectoryTorch[source]

Bases: torchfilter.types.Trajectory

Inheritance diagram of torchfilter.types.TrajectoryTorch

Named tuple containing states, observations, and controls represented in Torch.

states :StatesTorch
observations :ObservationsTorch
controls :ControlsTorch