Skip to content

Commit

Permalink
handle nan's in vmafs
Browse files Browse the repository at this point in the history
  • Loading branch information
master-of-zen committed May 18, 2020
1 parent a484130 commit 6984fbe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion av1an.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def read_vmaf_xml(file):
# Data
x = [x for x in range(len(vmafs))]
mean = round(sum(vmafs) / len(vmafs), 3)
calc = [x for x in vmafs if isinstance(x, float)]
calc = [x for x in vmafs if isinstance(x, float) and not isnan(x)]
perc_1 = round(np.percentile(calc, 1), 3)
perc_25 = round(np.percentile(calc, 25), 3)
perc_75 = round(np.percentile(calc, 75), 3)
Expand Down

0 comments on commit 6984fbe

Please sign in to comment.