Sorry, this code is not really part of this PR, but I don't really like this style: given the above lines, we now that y_true is an array, so we can just check that 'y_true.ndim == 1', and avoid calling an auxiliary function that has no added value.