Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/spikeinterface/core/tests/test_waveform_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ def test_estimate_templates():


if __name__ == "__main__":
# cache_folder = Path(__file__).resolve().parents[4] / "cache_folder" / "core"
# test_waveform_tools(cache_folder)
cache_folder = Path(__file__).resolve().parents[4] / "cache_folder" / "core"
test_waveform_tools(cache_folder)
# test_estimate_templates_with_accumulator()
test_estimate_templates()
# test_estimate_templates()
6 changes: 4 additions & 2 deletions src/spikeinterface/core/waveform_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ def extract_waveforms_to_single_buffer(

job_kwargs = fix_job_kwargs(job_kwargs)

if num_spikes > 0:
if num_spikes > 0 and num_chans > 0:
# and run
func = _worker_distribute_single_buffer
init_func = _init_worker_distribute_single_buffer
Expand All @@ -564,11 +564,13 @@ def extract_waveforms_to_single_buffer(
return all_waveforms
elif mode == "shared_memory":
if copy:
wf_out = all_waveforms.copy()
if shm is not None:
# release all sharedmem buffer
# empty array have None
shm.close()
shm.unlink()
return all_waveforms.copy()
return wf_out
else:
return all_waveforms, wf_array_info

Expand Down