Repository: scipy/scipy
File: scipy/spatial/transform/_rigid_transform.py (Python)

Code before:
        """
        matrix = self._xp.asarray(self._matrix, copy=True)
        if self._single:
            return matrix[0, ...]
        return matrix

    @xp_capabilities(
        skip_backends=[("dask.array", "missing linalg.cross/det functions")]
    )
    def as_components(self) -> tuple[Array, Rotation]:
        """Return the translation and rotation components of the transform,
        where the rotation is applied first, followed by the translation.

        4x4 rigid transformation matrices are of the form::

            [       tx]
            [   R   ty]
            [       tz]
            [ 0 0 0  1]

        Where ``R`` is a 3x3 orthonormal rotation matrix and
        ``t = [tx, ty, tz]`` is a 3x1 translation vector. This function
        returns the rotation corresponding to this rotation matrix
        ``r = Rotation.from_matrix(R)`` and the translation vector ``t``.

        When applying a transform `tf` to a vector `v`, the result is the same
        as if the rotation and translation components were applied to the vector
        with the following operation:
        ``tf.apply(v) == translation + rotation.apply(v)``.

        Returns
        -------
        translation : numpy.ndarray, shape (..., 3)
            The translation of the transform.
        rotation : `Rotation` instance
            The rotation of the transform.

        Examples
        --------
        >>> from scipy.spatial.transform import RigidTransform as Tf
        >>> from scipy.spatial.transform import Rotation as R
        >>> import numpy as np

        Recover the rotation and translation from a transform:

        >>> t = np.array([2, 3, 4])
        >>> r = R.from_matrix([[0, 0, 1],
        ...                    [1, 0, 0],
        ...                    [0, 1, 0]])
        >>> tf = Tf.from_components(t, r)
        >>> t, r = tf.as_components()

Review comment (suggestion):
minor: you lost a couple of backticks here, code is always typeset with double backticks in ReST. Single backticks are for references that Sphinx turns into links. 

```suggestion
        When applying a transform ``tf`` to a vector ``v``, the result is the same
```

I'll apply that change before merging.

Code after:
        """
        matrix = self._xp.asarray(self._matrix, copy=True)
        if self._single:
            return matrix[0, ...]
        return matrix

    @xp_capabilities(
        skip_backends=[("dask.array", "missing linalg.cross/det functions")]
    )
    def as_components(self) -> tuple[Array, Rotation]:
        """Return the translation and rotation components of the transform,
        where the rotation is applied first, followed by the translation.

        4x4 rigid transformation matrices are of the form::

            [       tx]
            [   R   ty]
            [       tz]
            [ 0 0 0  1]

        Where ``R`` is a 3x3 orthonormal rotation matrix and
        ``t = [tx, ty, tz]`` is a 3x1 translation vector. This function
        returns the rotation corresponding to this rotation matrix
        ``r = Rotation.from_matrix(R)`` and the translation vector ``t``.

        When applying a transform ``tf`` to a vector ``v``, the result is the same
        as if the rotation and translation components were applied to the vector
        with the following operation:
        ``tf.apply(v) == translation + rotation.apply(v)``.

        Returns
        -------
        translation : numpy.ndarray, shape (..., 3)
            The translation of the transform.
        rotation : `Rotation` instance
            The rotation of the transform.

        Examples
        --------
        >>> from scipy.spatial.transform import RigidTransform as Tf
        >>> from scipy.spatial.transform import Rotation as R
        >>> import numpy as np

        Recover the rotation and translation from a transform:

        >>> t = np.array([2, 3, 4])
        >>> r = R.from_matrix([[0, 0, 1],
        ...                    [1, 0, 0],
        ...                    [0, 1, 0]])
        >>> tf = Tf.from_components(t, r)
        >>> t, r = tf.as_components()