Skip to content
Snippets Groups Projects
Commit 628a4892 authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Fix bad usage of logging

parent 41ba6f16
No related branches found
No related tags found
1 merge request!93Click scripts fixes
Pipeline #29679 passed
...@@ -2,7 +2,9 @@ ...@@ -2,7 +2,9 @@
import numpy import numpy
import scipy.stats import scipy.stats
import bob.core import logging
LOGGER = logging.getLogger(__name__)
def remove_nan(scores): def remove_nan(scores):
...@@ -25,9 +27,8 @@ def remove_nan(scores): ...@@ -25,9 +27,8 @@ def remove_nan(scores):
sum_nans = sum(nans) sum_nans = sum(nans)
total = len(scores) total = len(scores)
if sum_nans > 0: if sum_nans > 0:
logger = bob.core.log.setup("bob.measure") LOGGER.warning('Found {} NaNs in {} scores'.format(sum_nans, total))
logger.warning('Found {} NaNs in {} scores'.format(sum_nans, total)) return scores[~nans], sum_nans, total
return scores[numpy.where(~nans)], sum_nans, total
def get_fta(scores): def get_fta(scores):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment