aboutsummaryrefslogtreecommitdiff
path: root/gn3/computations
diff options
context:
space:
mode:
authorzsloan2022-02-25 21:03:15 +0000
committerzsloan2022-02-25 15:11:38 -0600
commit8e0fcfa78fcdb5bdd5b49e2b1ac918ae9cc0fc53 (patch)
tree9e877793205763834765057aceb8d45e9bc1415e /gn3/computations
parent7675612a0e7023c22b7b17b3a1ec19cce5641261 (diff)
downloadgenenetwork3-8e0fcfa78fcdb5bdd5b49e2b1ac918ae9cc0fc53.tar.gz
Fix issue where 0's were treated as False for the primary trait in
correlations In the original version of the if statement* I believe it was interpreted as "if a_val and (b_val is not None)". This caused values of 0 for a_val (the primary trait's values) to be evaluated as False. I changed it to compare both a_val and b_val to None. This seems to have fixed the issue. * if (a_val and b_val is not None)
Diffstat (limited to 'gn3/computations')
-rw-r--r--gn3/computations/correlations.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/gn3/computations/correlations.py b/gn3/computations/correlations.py
index e30d497..a0da2c4 100644
--- a/gn3/computations/correlations.py
+++ b/gn3/computations/correlations.py
@@ -47,7 +47,7 @@ def normalize_values(a_values: List, b_values: List) -> Generator:
"""
for a_val, b_val in zip(a_values, b_values):
- if (a_val and b_val is not None):
+ if (a_val is not None) and (b_val is not None):
yield a_val, b_val