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
Connor Hainje
pidanalysis
Commits
64602dd7
Commit
64602dd7
authored
Dec 13, 2021
by
connor.hainje@pnnl.gov
Browse files
Silence warning when df is zero length in compute blame
parent
2ac70dfb
Changes
1
Hide whitespace changes
Inline
Side-by-side
packages/pidplots/pidplots/compute.py
View file @
64602dd7
...
...
@@ -130,7 +130,8 @@ def compute_blame_numbers(df):
def
compute_blame
(
df
):
nums
=
compute_blame_numbers
(
df
)
top
=
np
.
argmax
(
nums
)
return
top
,
nums
[
top
]
/
len
(
df
)
frac
=
nums
[
top
]
/
len
(
df
)
if
len
(
df
)
>
0
else
np
.
nan
return
top
,
frac
def
compute_blame_in_all_bins
(
df
):
...
...
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