rbnet.util.normalize_non_zero
- rbnet.util.normalize_non_zero(a, axis=<object object>, make_zeros_uniform=False, skip_type_check=False, check_positivity=True)[source]
For the given ND array (NumPy or PyTorch), 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.