Skip to content

Commit

Permalink
fix box casting
Browse files Browse the repository at this point in the history
  • Loading branch information
DomFijan committed Jan 21, 2025
1 parent f9d7f27 commit 7be7c1c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion freud/box.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ def __init__(self, Lx, Ly, Lz=0, xy=0, xz=0, yz=0, is2D=None):
elif not (Lx and Ly and Lz):
msg = "Lx, Ly, and Lz must be nonzero for 3D boxes."
raise ValueError(msg)
self._cpp_obj = freud._box.Box(Lx, Ly, Lz, xy, xz, yz, is2D)
self._cpp_obj = freud._box.Box(
*[float(x) for x in [Lx, Ly, Lz, xy, xz, yz]], bool(is2D)
)

@property
def L(self):
Expand Down

0 comments on commit 7be7c1c

Please sign in to comment.