diff options
author | Frederick Muriuki Muriithi | 2021-10-29 08:38:48 +0300 |
---|---|---|
committer | Frederick Muriuki Muriithi | 2021-10-29 08:38:48 +0300 |
commit | 116006464a61edcfa354b729ea40a7af28c08d61 (patch) | |
tree | fe7d2d3e72eae4cc81a4fcc3c3af5e7273a2bc0a /tests/unit | |
parent | 37f7fee32604e9ae752a33b473dd1abe22b05906 (diff) | |
download | genenetwork3-116006464a61edcfa354b729ea40a7af28c08d61.tar.gz |
Specify ten (10) decimal places
Issue:
https://github.com/genenetwork/gn-gemtext-threads/blob/main/topics/gn1-migration-to-gn2/partial-correlations.gmi
* gn3/computations/partial_correlations.py: specify 10 decimal places
* tests/unit/computations/test_partial_correlations.py: update examples
Slight differences in python implementations, possibly hardware and
operating systems could cause the value of float (double) values to be
different in the less significant parts of the decimal places.
This commit limits the usable part of the decimals to the first 10 decimal
places for now.
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/computations/test_partial_correlations.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/tests/unit/computations/test_partial_correlations.py b/tests/unit/computations/test_partial_correlations.py index ac5eb20..c4ec79a 100644 --- a/tests/unit/computations/test_partial_correlations.py +++ b/tests/unit/computations/test_partial_correlations.py @@ -254,10 +254,9 @@ class TestPartialCorrelations(TestCase): """ for primary, target, method, expected in ( ((12.34, 18.36, 42.51), (37.25, 46.25, 46.56), "pearson", - (0.6761779252651052, 0.5272701133657985)), + (0.6761779253, 0.5272701134)), ((1, 2, 3, 4, 5), (5, 6, 7, 8, 7), "spearman", - (0.8207826816681233, 0.08858700531354381)) - ): + (0.8207826817, 0.0885870053))): with self.subTest(primary=primary, target=target, method=method): self.assertEqual( tissue_correlation(primary, target, method), expected) |