From 7d3450453ba4f403f60cc338912a830d9b8c4ed7 Mon Sep 17 00:00:00 2001 From: DAWells Date: Mon, 6 Apr 2026 23:48:33 +0100 Subject: [PATCH] Fix `test_correct_c_array` test Fill missing values in pivot with zero to match make_c_array where zeros are important. --- tests/test_HLAfreq_pymc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_HLAfreq_pymc.py b/tests/test_HLAfreq_pymc.py index 3167b06..7bb2532 100644 --- a/tests/test_HLAfreq_pymc.py +++ b/tests/test_HLAfreq_pymc.py @@ -33,6 +33,7 @@ def test_correct_c_array(aftab): aftab = HLAfreq.decrease_resolution(aftab, 2) aftab['c'] = 2 * aftab.allele_freq * aftab.sample_size c_pivot = aftab.pivot(columns="allele", index="population", values="c") + c_pivot = c_pivot.fillna(0) c_array = HLAhdi._make_c_array(aftab) assert pytest.approx(c_array[0]) == c_pivot