From 5206e791066fd6d83851aae40c7a243074e53122 Mon Sep 17 00:00:00 2001 From: Olivia Lynn Date: Mon, 23 Sep 2024 23:05:46 -0400 Subject: [PATCH] Remove unnecessary np.unique --- src/tdastro/astro_utils/passbands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tdastro/astro_utils/passbands.py b/src/tdastro/astro_utils/passbands.py index cd333569..024e0647 100644 --- a/src/tdastro/astro_utils/passbands.py +++ b/src/tdastro/astro_utils/passbands.py @@ -109,7 +109,7 @@ def _update_waves(self) -> None: def _calculate_in_band_wave_indices(self) -> None: """Calculate the indices of the group's wave grid that are in the passband's wave grid. - + Eg, if a group's waves are [11, 12, 13, 14, 15] and a single band's are [13, 14], we get [2, 3]. The indices are stored in the passband's _in_band_wave_indices attribute as either a tuple of two ints @@ -127,7 +127,7 @@ def _calculate_in_band_wave_indices(self) -> None: if np.array_equal(self.waves[lower_index : upper_index + 1], passband.waves): indices = (lower_index, upper_index + 1) else: - indices = np.unique(np.searchsorted(self.waves, passband.waves)) + indices = np.searchsorted(self.waves, passband.waves) passband._in_band_wave_indices = indices def process_transmission_tables(