Behaving with one class is different to behaving correctly with one class. Even this function gives a different response if that one class is the positive or the negative label.