Skip to content

Commit

Permalink
Acceptance boundary zero shape (2,1) (#714)
Browse files Browse the repository at this point in the history
* Update boundary.py

* return [0, 0] when all particles are lost

* change shape of zeros ouput to (2,1)

---------

Co-authored-by: simone liuzzo <[email protected]>
  • Loading branch information
swhite2401 and simoneliuzzo committed Nov 30, 2023
1 parent f9e5340 commit 95b9dfc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pyat/at/acceptance/boundary.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ def radial_boundary(mask, grid):
msg = ("No particle survived, please check your grid "
"or lattice. Acceptance set to [0.0, 0.0].")
warnings.warn(AtWarning(msg))
return numpy.zeros(2)
return numpy.zeros((2, 1))

if config.mode is GridMode.RADIAL:
return radial_boundary(mask, grid)
Expand Down

0 comments on commit 95b9dfc

Please sign in to comment.