code: def get_axis(self, undefined=np.zeros(3)):
          
          tolerance = 1e-17
          self._normalise()
          norm = np.linalg.norm(self.vector)
          if norm < tolerance:
              # Here there are an infinite set of possible axes, use what has been specified as an undefined axis.
              return undefined
          else:
              return self.vector / norm
docs: Get the axis or vector about which the quaternion rotation occurs
  
          For a null rotation (a purely real quaternion), the rotation angle will
          always be `0`, but the rotation axis is undefined.
          It is by default assumed to be `[0, 0, 0]`.
  
          Params:
              undefined: [optional] specify the axis vector that should define a null rotation.
                  This is geometrically meaningless, and could be any of an infinite set of vectors,
                  but can be specified if the default (`[0, 0, 0]`) causes undesired behaviour.
  
          Returns:
              A Numpy unit 3-vector describing the Quaternion object's axis of rotation.
  
          Note:
              This feature only makes sense when referring to a unit quaternion.
              Calling this method will implicitly normalise the Quaternion object to a unit quaternion if it is not already one.