Skip to content

Commit

Permalink
return False in _positional mask if no ids
Browse files Browse the repository at this point in the history
  • Loading branch information
Joni Herttuainen committed Jan 4, 2024
1 parent 3073a67 commit 10df397
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions bluepysnap/query.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ def _positional_mask(data, ids):
return True
if isinstance(ids, int):
ids = [ids]
elif len(ids) == 0:
return False
mask = np.full(len(data), fill_value=False)
indices = data.index.get_indexer(ids)
mask[indices[indices > -1]] = True
Expand Down

0 comments on commit 10df397

Please sign in to comment.