code: def vector_unit_nonull(v):
      
      if v.size == 0:
          return v
      return v / vector_mag(v)[..., np.newaxis]
docs: Return unit vectors.
      Any null vectors raise an Exception.
  
      Parameters
      ----------
      v: array, shape (a1, a2, ..., d)
          Cartesian vectors, with last axis indexing the dimension.
  
      Returns
      -------
      v_new: array, shape of v