Skip to content

Commit

Permalink
Return 1.0 in vifp.py if num/den = nan
Browse files Browse the repository at this point in the history
  • Loading branch information
mrebersv committed Aug 2, 2016
1 parent 92824f2 commit f0cc4d1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vifp.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ def vifp_mscale(ref, dist):

vifp = num/den

return vifp

if numpy.isnan(vifp):
return 1.0
else:
return vifp

0 comments on commit f0cc4d1

Please sign in to comment.