<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def vector_unit_nonull(v):
 """Return unit vectors. Any null vectors raise an Exception. Parameters Cartesian vectors, with last axis indexing the dimension. Returns ------- v_new: array, shape of v """

    if v.size == 0:
        return v
    return v / vector_mag(v)[..., np.newaxis]