reduce#
- Rotation.reduce(left=None, right=None, return_indices=False)[source]#
Reduce this rotation with the provided rotation groups.
Reduction of a rotation
pis a transformation of the formq = l * p * r, wherelandrare chosen from left and right respectively, such that rotationqhas the smallest magnitude.If left and right are rotation groups representing symmetries of two objects rotated by
p, thenqis the rotation of the smallest magnitude to align these objects considering their symmetries.- Parameters:
- left
Rotationinstance, optional Object containing the left rotation(s). Default value (None) corresponds to the identity rotation.
- right
Rotationinstance, optional Object containing the right rotation(s). Default value (None) corresponds to the identity rotation.
- return_indicesbool, optional
Whether to return the indices of the rotations from left and right used for reduction.
- left
- Returns:
- reduced
Rotationinstance Object containing reduced rotations.
- left_best, right_best: integer ndarray
Indices of elements from left and right used for reduction.
- reduced
Notes
Array API Standard Support
reducehas experimental support for Python Array API Standard compatible backends in addition to NumPy. Please consider testing these features by setting an environment variableSCIPY_ARRAY_API=1and 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.