diff --git a/pyrepseq/stats.py b/pyrepseq/stats.py index 2f36c65..b74e92a 100644 --- a/pyrepseq/stats.py +++ b/pyrepseq/stats.py @@ -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)