pitchscapes.scapes.normalize_non_zero

pitchscapes.scapes.normalize_non_zero(a, axis=None, replace_zeros=False, skip_type_check=False)[source]

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.