Skip to content

Commit

Permalink
Do not hard code largest size of boundary interaction array
Browse files Browse the repository at this point in the history
  • Loading branch information
atharva-2001 committed Jan 10, 2025
1 parent d1573cd commit 356c0d3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tardis/transport/montecarlo/tests/test_rpacket_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
Expand Down

0 comments on commit 356c0d3

Please sign in to comment.