parameters: (cls, quat, normalized=False)
return_statement: return cls(quat, normalized)
docstring: Initialize from quaternions.
  
          3D rotations can be represented using unit-norm quaternions [1]_.
  
          Parameters
          ----------
          quat : array_like, shape (N, 4) or (4,)
              Each row is a (possibly non-unit norm) quaternion in scalar-last
              (x, y, z, w) format.
          normalized : boolean, optional
              If `False`, input quaternions are normalized to unit norm before
              being stored. If `True`, quaternions are assumed to already have
              unit norm and are stored as given. Default is `False`.
  
          Returns
          -------
          rotation : `Rotation` instance
              Object containing the rotations represented by input quaternions.
  
          References
          ----------
          .. [1] `Quaternions and Spatial Rotation
                 <https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation>`_
  
          Examples
          --------
          >>> from scipy.spatial.transform import Rotation as R
  
          Initialize a single rotation:
  
          >>> r = R.from_quat([1, 0, 0, 0])
          >>> r.as_quat()
          array([1., 0., 0., 0.])
          >>> r.as_quat().shape
          (4,)
  
          Initialize multiple rotations in a single object:
  
          >>> r = R.from_quat([
          ... [1, 0, 0, 0],
          ... [0, 0, 0, 1]
          ... ])
          >>> r.as_quat()
          array([[1., 0., 0., 0.],
                 [0., 0., 0., 1.]])
          >>> r.as_quat().shape
          (2, 4)
  
          It is also possible to have a stack of a single rotation:
  
          >>> r = R.from_quat([[0, 0, 0, 1]])
          >>> r.as_quat()
          array([[0., 0., 0., 1.]])
          >>> r.as_quat().shape
          (1, 4)
  
          By default, quaternions are normalized before initialization.
  
          >>> r = R.from_quat([0, 0, 1, 1])
          >>> r.as_quat()
          array([0.        , 0.        , 0.70710678, 0.70710678])
  
          If unit norms are ensured, skip the normalization step.
  
          >>> r = R.from_quat([0, 0, 1, 0], normalized=True)
          >>> r.as_quat()
          array([0., 0., 1., 0.])
docstring_summary: Initialize from quaternions.
docstring_tokens: Initialize from quaternions .
function: def from_quat(cls, quat, normalized=False):
          """Initialize from quaternions.
  
          3D rotations can be represented using unit-norm quaternions [1]_.
  
          Parameters
          ----------
          quat : array_like, shape (N, 4) or (4,)
              Each row is a (possibly non-unit norm) quaternion in scalar-last
              (x, y, z, w) format.
          normalized : boolean, optional
              If `False`, input quaternions are normalized to unit norm before
              being stored. If `True`, quaternions are assumed to already have
              unit norm and are stored as given. Default is `False`.
  
          Returns
          -------
          rotation : `Rotation` instance
              Object containing the rotations represented by input quaternions.
  
          References
          ----------
          .. [1] `Quaternions and Spatial Rotation
                 <https://en.wikipedia.org/wiki/Quaternions_and_spatial_rotation>`_
  
          Examples
          --------
          >>> from scipy.spatial.transform import Rotation as R
  
          Initialize a single rotation:
  
          >>> r = R.from_quat([1, 0, 0, 0])
          >>> r.as_quat()
          array([1., 0., 0., 0.])
          >>> r.as_quat().shape
          (4,)
  
          Initialize multiple rotations in a single object:
  
          >>> r = R.from_quat([
          ... [1, 0, 0, 0],
          ... [0, 0, 0, 1]
          ... ])
          >>> r.as_quat()
          array([[1., 0., 0., 0.],
                 [0., 0., 0., 1.]])
          >>> r.as_quat().shape
          (2, 4)
  
          It is also possible to have a stack of a single rotation:
  
          >>> r = R.from_quat([[0, 0, 0, 1]])
          >>> r.as_quat()
          array([[0., 0., 0., 1.]])
          >>> r.as_quat().shape
          (1, 4)
  
          By default, quaternions are normalized before initialization.
  
          >>> r = R.from_quat([0, 0, 1, 1])
          >>> r.as_quat()
          array([0.        , 0.        , 0.70710678, 0.70710678])
  
          If unit norms are ensured, skip the normalization step.
  
          >>> r = R.from_quat([0, 0, 1, 0], normalized=True)
          >>> r.as_quat()
          array([0., 0., 1., 0.])
  
          """
          return cls(quat, normalized)
function_tokens: def from_quat ( cls , quat , normalized = False ) : return cls ( quat , normalized )