Skip to content

Commit 9ca603e

Browse files
authored
Fixes a couple of minor warnings (#4707)
1 parent 4ce6854 commit 9ca603e

2 files changed

Lines changed: 4 additions & 14 deletions

File tree

src/spikeinterface/core/binaryrecordingextractor.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -156,17 +156,6 @@ def get_binary_description(self):
156156
)
157157
return d
158158

159-
def __del__(self):
160-
"""
161-
Ensures that all segment resources are properly cleaned up when this recording extractor is deleted.
162-
Closes any open file handles in the recording segments.
163-
"""
164-
# Close all recording segments
165-
for segment in self.segments:
166-
# This will trigger the __del__ method of the BinaryRecordingSegment
167-
# which will close the file handle
168-
del segment
169-
170159

171160
BinaryRecordingExtractor.write_recording.__doc__ = BinaryRecordingExtractor.write_recording.__doc__.format(
172161
_shared_job_kwargs_doc

src/spikeinterface/postprocessing/template_similarity.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,10 @@ def _compute_similarity_matrix_numba(
341341
tgt_sliced = other_templates_array[:, num_shifts + shift : num_samples - num_shifts + shift]
342342

343343
for i in prange(num_templates):
344-
src_template = src_sliced[i]
345-
overlapping_ids = overlapping_j_list[i]
346-
overlapping_chs = active_channels_list[i]
344+
i_ = np.int64(i)
345+
src_template = src_sliced[i_]
346+
overlapping_ids = overlapping_j_list[i_]
347+
overlapping_chs = active_channels_list[i_]
347348

348349
for pair_idx in range(len(overlapping_ids)):
349350
j = np.uint16(overlapping_ids[pair_idx])

0 commit comments

Comments
 (0)