Skip to content

Commit

Permalink
Merge pull request #3178 from alejoe91/fix-pca-components
Browse files Browse the repository at this point in the history
Fix pca transform error
  • Loading branch information
samuelgarcia authored Jul 15, 2024
2 parents 60bd1e6 + caefa4e commit eba9f68
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 eba9f68

Please sign in to comment.