Skip to content

Commit

Permalink
Fixes bug in SortingAnalyzer
Browse files Browse the repository at this point in the history
Fixes a bug where `self.folder / "something"` crashes if the given
folder was a str to begin with.
Need to cast it to a Path.
  • Loading branch information
DradeAW committed Mar 6, 2024
1 parent 66c828d commit be847e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/spikeinterface/core/sortinganalyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,11 @@ def create(
elif format == "binary_folder":
cls.create_binary_folder(folder, sorting, recording, sparsity, rec_attributes=None)
sorting_analyzer = cls.load_from_binary_folder(folder, recording=recording)
sorting_analyzer.folder = folder
sorting_analyzer.folder = Path(folder)
elif format == "zarr":
cls.create_zarr(folder, sorting, recording, sparsity, rec_attributes=None)
sorting_analyzer = cls.load_from_zarr(folder, recording=recording)
sorting_analyzer.folder = folder
sorting_analyzer.folder = Path(folder)
else:
raise ValueError("SortingAnalyzer.create: wrong format")

Expand Down Expand Up @@ -752,7 +752,7 @@ def compute(self, input, save=True, **kwargs):
Parameters
----------
input: str or dict
input: str or dict or list
If the input is a string then computes one extension with compute_one_extension(extension_name=input, ...)
If the input is a dict then compute several extensions with compute_several_extensions(extensions=input)
"""
Expand Down

0 comments on commit be847e1

Please sign in to comment.