Skip to content

Commit

Permalink
nan instead of inf
Browse files Browse the repository at this point in the history
  • Loading branch information
andim committed Jun 2, 2024
1 parent d206025 commit 3cce014
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyrepseq/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def var_chao1(counts):

f1 = counts[0]
if (len(counts)==1) or (counts[1] == 0):
return np.inf
return np.nan
f2 = counts[1]
ratio = f1 / f2
return f2 * ((ratio / 4) ** 4 + ratio**3 + (ratio / 2) ** 2)
Expand Down

0 comments on commit 3cce014

Please sign in to comment.