Skip to content

Commit

Permalink
Merge pull request #15 from cwindolf/iblsorter
Browse files Browse the repository at this point in the history
peeler empty result should have the same structure as a normal chunk
  • Loading branch information
cwindolf authored Nov 7, 2024
2 parents df65ce9 + 04a2371 commit 389f54d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/dartsort/transform/temporal_pca.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def needs_fit(self):
return self._needs_fit

def _temporal_slice(self, waveforms):
if self.temporal_slice is None:
if getattr(self, 'temporal_slice', None) is None:
return waveforms

return waveforms[:, self.temporal_slice]
Expand Down Expand Up @@ -177,6 +177,7 @@ class TemporalPCAFeaturizer(BaseWaveformFeaturizer, BaseTemporalPCA):

def transform(self, waveforms, max_channels, channel_index=None, return_in_probe=False):
waveforms = self._temporal_slice(waveforms)

if channel_index is None:
channel_index = self.channel_index
(
Expand Down

0 comments on commit 389f54d

Please sign in to comment.