(quat)
Returns the axis-angle corresponding to the provided quaternion.

  Args:
    quat: A quaternion [w, i, j, k].

  Returns:
    axisangle: A 3x1 numpy array describing the axis of rotation, with angle
        encoded by its length.
Returns the axis-angle corresponding to the provided quaternion.
Returns the axis - angle corresponding to the provided quaternion .
def quat_to_axisangle(quat):
  """Returns the axis-angle corresponding to the provided quaternion.

  Args:
    quat: A quaternion [w, i, j, k].

  Returns:
    axisangle: A 3x1 numpy array describing the axis of rotation, with angle
        encoded by its length.
  """
  angle = 2 * np.arccos(_clip_within_precision(quat[0], -1., 1.))

  if angle < _TOL:
    return np.zeros(3)
  else:
    qn = np.sin(angle/2)
    angle = (angle + np.pi) % (2 * np.pi) - np.pi
    axis = quat[1:4] / qn
    return axis * angle
def quat_to_axisangle ( quat ) : angle = 2 * np . arccos ( _clip_within_precision ( quat [ 0 ] , - 1. , 1. ) ) if angle < _TOL : return np . zeros ( 3 ) else : qn = np . sin ( angle / 2 ) angle = ( angle + np . pi ) % ( 2 * np . pi ) - np . pi axis = quat [ 1 : 4 ] / qn return axis * angle