PEP8 There should be two blank lines between top-level functions.
PEP8 Removed unnecessary backslashes.
TST Extended the test to include a case where y_true contains only zeros, -1s.