Skip to content

Commit

Permalink
Remove unnecessary np.unique
Browse files Browse the repository at this point in the history
  • Loading branch information
OliviaLynn committed Sep 24, 2024
1 parent 0306af2 commit 5206e79
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/tdastro/astro_utils/passbands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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(
Expand Down

0 comments on commit 5206e79

Please sign in to comment.