Skip to content

Commit

Permalink
in1d to isin
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelgarcia committed Oct 5, 2023
1 parent df35c6a commit 94bfb70
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/spikeinterface/sortingcomponents/clustering/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def aggregate_sparse_features(peaks, peak_indices, sparse_feature, sparse_mask,
for chan in np.unique(local_peaks["channel_index"]):
sparse_chans = np.flatnonzero(sparse_mask[chan, :])
peak_inds = np.flatnonzero(local_peaks["channel_index"] == chan)
if np.all(np.in1d(target_channels, sparse_chans)):
if np.all(np.isin(target_channels, sparse_chans)):
# peaks feature channel have all target_channels
source_chans = np.flatnonzero(np.in1d(sparse_chans, target_channels))
aligned_features[peak_inds, :, :] = sparse_feature[peak_indices[peak_inds], :, :][:, :, source_chans]
Expand Down

0 comments on commit 94bfb70

Please sign in to comment.