The message was wrong but there is still a zero devision error (undefined metrics problem) if the there is only one sample or if the `y_true` is constant or one element of `y_true` is exactly equal to its mean isn't it?