Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
bob
bob.measure
Commits
628a4892
Commit
628a4892
authored
Apr 29, 2019
by
Amir MOHAMMADI
Browse files
Fix bad usage of logging
parent
41ba6f16
Pipeline
#29679
passed with stage
in 18 minutes and 57 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
bob/measure/utils.py
View file @
628a4892
...
...
@@ -2,7 +2,9 @@
import
numpy
import
scipy.stats
import
bob.core
import
logging
LOGGER
=
logging
.
getLogger
(
__name__
)
def
remove_nan
(
scores
):
...
...
@@ -25,9 +27,8 @@ def remove_nan(scores):
sum_nans
=
sum
(
nans
)
total
=
len
(
scores
)
if
sum_nans
>
0
:
logger
=
bob
.
core
.
log
.
setup
(
"bob.measure"
)
logger
.
warning
(
'Found {} NaNs in {} scores'
.
format
(
sum_nans
,
total
))
return
scores
[
numpy
.
where
(
~
nans
)],
sum_nans
,
total
LOGGER
.
warning
(
'Found {} NaNs in {} scores'
.
format
(
sum_nans
,
total
))
return
scores
[
~
nans
],
sum_nans
,
total
def
get_fta
(
scores
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment