diff --git a/src/statistics.py b/src/statistics.py index 9039d3f..9d2694d 100644 --- a/src/statistics.py +++ b/src/statistics.py @@ -38,7 +38,7 @@ def bh_fdr(pval): # calculate the needed alpha n = float(len(pval)) - pval_adj = np.zeros(n) + pval_adj = np.zeros(int(n)) i = np.arange(1, n+1, dtype=float)[::-1] # largest to smallest pval_adj = np.minimum(1, cummin(n/i * pval_array[::-1]))[::-1] return pval_adj[original_order]