# spacepy.coordinates.quaternionNormalize

spacepy.coordinates.quaternionNormalize(Qin, scalarPos='last')

  Given an input quaternion (or array of quaternions), return the unit quaternion

  Parameters
    vec array_like

      input quaternion to normalize

  Returns
    out array_like

      normalized quaternion

  Examples

      >>> import spacepy.coordinates
      >>> spacepy.coordinates.quaternionNormalize([0.707, 0, 0.707, 0.2])
      array([ 0.69337122,  0.        ,  0.69337122,  0.19614462])