diff --git a/src/spikeinterface/widgets/crosscorrelograms.py b/src/spikeinterface/widgets/crosscorrelograms.py index 6eb565d56a..e70a5775e6 100644 --- a/src/spikeinterface/widgets/crosscorrelograms.py +++ b/src/spikeinterface/widgets/crosscorrelograms.py @@ -46,7 +46,9 @@ def __init__( backend=None, **backend_kwargs, ): - sorting_analyzer_or_sorting = self.ensure_sorting_analyzer(sorting_analyzer_or_sorting) + + if not isinstance(sorting_analyzer_or_sorting, BaseSorting): + sorting_analyzer_or_sorting = self.ensure_sorting_analyzer(sorting_analyzer_or_sorting) if min_similarity_for_correlograms is None: min_similarity_for_correlograms = 0