diff --git a/freud/box.py b/freud/box.py index 4edbb9db3..08c711327 100644 --- a/freud/box.py +++ b/freud/box.py @@ -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):