From cbbf531417a2ebf3fa67510de11ac1c3657851fe Mon Sep 17 00:00:00 2001 From: Christopher Mayes <31023527+ChristopherMayes@users.noreply.github.com> Date: Tue, 19 Nov 2024 19:43:49 -0800 Subject: [PATCH] fix docstring for fractions --- pmd_beamphysics/particles.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pmd_beamphysics/particles.py b/pmd_beamphysics/particles.py index 4f7db76..6c8d8ac 100644 --- a/pmd_beamphysics/particles.py +++ b/pmd_beamphysics/particles.py @@ -1145,7 +1145,7 @@ def fractional_split(self, fractions: Union[float, int, list], key: str): Parameters ---------- - fractions : float, int, or list of float/int + fractions : float or list of float A fraction or a list of fractions used for splitting the particles. All values must be between 0 and 1 (exclusive). key : str @@ -1174,8 +1174,8 @@ def fractional_split(self, fractions: Union[float, int, list], key: str): raise ValueError("All fraction values must be between 0 and 1 (exclusive)") # Sort particles by the specified key - ixs = np.argsort(particles[key]) - sorted_particles = particles[ixs] + ixs = np.argsort(self[key]) + sorted_particles = self[ixs] # Sorted weights ws = sorted_particles.weight