unique#

OrientationRegion.unique(return_index: bool = False, return_inverse: bool = False, antipodal: bool = True) Rotation | Tuple[Rotation, ndarray] | Tuple[Rotation, ndarray, ndarray][source]#

Return the unique rotations from these rotations.

Two rotations are not unique if they have the same propriety AND: - they have the same numerical value OR - the numerical value of one is the negative of the other

Parameters:
return_index

If True, will also return the indices of the (flattened) data where the unique entries were found.

return_inverse

If True, will also return the indices to reconstruct the (flattened) data from the unique data.

antipodal

If False, rotations representing the same transformation whose values are numerically different (negative) will not be considered unique.

Returns:
R

Unique rotations.

idx_sort

Indices of the flattened rotations where the unique entries are found. Only returned if return_index=True.

inv

Indices to reconstruct the flattened rotations from the initial rotations. Only returned if return_inverse=True.