Skip to content

Commit

Permalink
Fixed #1 bug for newer version of numpywhich do not allow a float for…
Browse files Browse the repository at this point in the history
… instantiating a vector
  • Loading branch information
ctokheim committed Aug 8, 2018
1 parent d81ded3 commit 43b1dc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/statistics.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 43b1dc9

Please sign in to comment.