Skip to content

Commit

Permalink
use compiled pattern in 'neighbor_indices' properly
Browse files Browse the repository at this point in the history
  • Loading branch information
mamei16 committed Dec 27, 2023
1 parent 1bc873b commit ceb0a7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pypsf/neighbors.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def neighbor_indices(cluster_labels: np.array, w: int) -> List[int]:
pattern = cluster_labels[-w:]
p = ''.join(to_char(i) for i in pattern)
p = re.compile(p)
matches = re.finditer(p, t)
matches = p.finditer(t)
return [match.end() for match in matches]


Expand Down

0 comments on commit ceb0a7c

Please sign in to comment.