raiseerr.InvalidArgumentValueException(f"Incorrect similarity type: {similarity_type}. Should be cosine, covariance or rbf.")
defl2_normalise_barwise(an_array):
"""
Normalises the array barwise (i.e., in its first dimension) by the l_2 norm.
Null values are replaced by the small positive value of 10^{-10}.
Parameters
----------
an_array : numpy array
The array which needs to be normalised.
Returns
-------
numpy array
The normalised array.
"""
withwarnings.catch_warnings():
warnings.filterwarnings("ignore",message="invalid value encountered in true_divide")# Avoiding to show the warning, as it's handled, not te confuse the user.