code: def quaternion_inverse(quaternion):
      
      q = np.array(quaternion, dtype=np.float64, copy=True)
      np.negative(q[1:], q[1:])
      return q / np.dot(q, q)
docs: Return inverse of quaternion.
  
      >>> q0 = random_quaternion()
      >>> q1 = quaternion_inverse(q0)
      >>> np.allclose(quaternion_multiply(q0, q1), [1, 0, 0, 0])
      True