Skip to content

Commit

Permalink
Fix pca transform error
Browse files Browse the repository at this point in the history
  • Loading branch information
alejoe91 committed Jul 10, 2024
1 parent e4fa25a commit caefa4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/spikeinterface/postprocessing/principal_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ def _transform_waveforms(self, spikes, waveforms, pca_model, progress_bar):
try:
proj = pca_model.transform(wfs[:, :, wf_ind])
pca_projection[:, :, wf_ind][spike_mask, :] = proj
except NotFittedError as e:
except:
# this could happen if len(wfs) is less then n_comp for a channel
project_on_non_fitted = True
if project_on_non_fitted:
Expand Down

0 comments on commit caefa4e

Please sign in to comment.