scipy.spatial.transform.RigidTransform.

as_exp_coords#

RigidTransform.as_exp_coords()[source]#

Return the exponential coordinates of the transform.

This implements the logarithmic map that converts SE(3) to 6-dimensional real vectors.

This is an inverse of from_exp_coords where details on the mapping can be found.

Returns:
exp_coordsnumpy.ndarray, shape (N, 6) or (6,)

A single exponential coordinate vector or a stack of exponential coordinate vectors. The first three components define the rotation and the last three components define the translation.

Notes

Array API Standard Support

as_exp_coords has experimental support for Python Array API Standard compatible backends in addition to NumPy. Please consider testing these features by setting an environment variable SCIPY_ARRAY_API=1 and providing CuPy, PyTorch, JAX, or Dask arrays as array arguments. The following combinations of backend and device (or other capability) are supported.

Library

CPU

GPU

NumPy

n/a

CuPy

n/a

PyTorch

JAX

Dask

n/a

See Support for the array API standard for more information.

Examples

>>> from scipy.spatial.transform import RigidTransform as Tf
>>> import numpy as np

Get exponential coordinates of the identity matrix:

>>> Tf.identity().as_exp_coords()
array([0., 0., 0., 0., 0., 0.])