Contents:
For the given ND array, normalise each 1D array obtained by indexing the ‘axis’ dimension if the sum along the other dimensions (for that entry) is non-zero. Normalisation is performed in place.