diff --git a/PyHEADTAIL/_version.py b/PyHEADTAIL/_version.py index 82b6a36f..f43a2786 100644 --- a/PyHEADTAIL/_version.py +++ b/PyHEADTAIL/_version.py @@ -1 +1 @@ -__version__ = '1.13.1' +__version__ = '1.13.2' diff --git a/PyHEADTAIL/aperture/aperture.py b/PyHEADTAIL/aperture/aperture.py index afeb8d84..27b79011 100644 --- a/PyHEADTAIL/aperture/aperture.py +++ b/PyHEADTAIL/aperture/aperture.py @@ -19,7 +19,6 @@ import numpy as np def make_int32(array): - # return np.array(array, dtype=np.int32) return array.astype(np.int32) @@ -89,8 +88,9 @@ def relocate_lost_particles(beam, alive): beam.reorder(perm) - n_alive = make_int32(pm.sum(alive)) - return n_alive + # on CPU: (even if pm.device == 'GPU', as pm.sum returns np.ndarray) + n_alive = pm.sum(alive) + return np.int32(n_alive) class RectangularApertureX(Aperture):