From 356c0d35ff4e1880a25ad28dff47e1288de13362 Mon Sep 17 00:00:00 2001 From: Atharva Arya Date: Fri, 10 Jan 2025 19:05:09 +0530 Subject: [PATCH] Do not hard code largest size of boundary interaction array --- tardis/transport/montecarlo/tests/test_rpacket_tracker.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tardis/transport/montecarlo/tests/test_rpacket_tracker.py b/tardis/transport/montecarlo/tests/test_rpacket_tracker.py index 971183d2360..9317089a65e 100644 --- a/tardis/transport/montecarlo/tests/test_rpacket_tracker.py +++ b/tardis/transport/montecarlo/tests/test_rpacket_tracker.py @@ -135,10 +135,9 @@ def test_rpacket_tracker_properties(expected, obtained, request): def test_boundary_interactions(rpacket_tracker, regression_data): no_of_packets = len(rpacket_tracker) - # Hard coding the number of columns - # Based on the largest size of boundary_interaction array (60) + max_boundary_interaction_size = max([tracker.boundary_interaction.size for tracker in rpacket_tracker]) obtained_boundary_interaction = np.full( - (no_of_packets, 64), + (no_of_packets, max_boundary_interaction_size), [-1], dtype=rpacket_tracker[0].boundary_interaction.dtype, )