Skip to content

Commit

Permalink
broadcast series to dataframe required in latest version of pandas
Browse files Browse the repository at this point in the history
  • Loading branch information
hdashnow committed Jul 2, 2018
1 parent dac24e9 commit 239fd47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/estimateSTR.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def main():

elif z.shape[0] > 1:
# Calculate p values based on z scores (one sided)
pvals = z.apply(lambda z_row: [norm.sf(x) for x in z_row], axis=1) # apply to each row
pvals = z.apply(lambda z_row: [norm.sf(x) for x in z_row], axis=1, result_type='broadcast') # apply to each row

# Adjust p values using Benjamini/Hochberg method
adj_pvals = pvals.apply(p_adj_bh, axis=0) # apply to each column
Expand Down

0 comments on commit 239fd47

Please sign in to comment.