We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 511f0b1 + ad9e69e commit 1cba09bCopy full SHA for 1cba09b
1 file changed
malariagen_data/anoph/fst.py
@@ -539,8 +539,11 @@ def plot_pairwise_average_fst(
539
if annotation == "standard error":
540
fig_df.loc[cohort1, cohort2] = se
541
elif annotation == "Z score":
542
- zs = fst / se
543
- fig_df.loc[cohort1, cohort2] = zs
+ try:
+ zs = fst / se
544
+ fig_df.loc[cohort1, cohort2] = zs
545
+ except ZeroDivisionError:
546
+ fig_df.loc[cohort1, cohort2] = np.nan
547
else:
548
fig_df.loc[cohort1, cohort2] = fst
549
0 commit comments