Skip to content

Commit

Permalink
import scipy inside func
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahpearl committed Nov 7, 2024
1 parent a147110 commit 5f0771b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/spikeinterface/exporters/to_ibl.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import numpy as np
import numpy.typing as npt
from scipy.signal import welch
from tqdm.auto import tqdm

from spikeinterface.core import ChannelSparsity, SortingAnalyzer
Expand Down Expand Up @@ -82,6 +81,11 @@ def export_to_ibl(
"""

try:
from scipy.signal import welch
except ImportError as e:
raise ImportError("Please install scipy to use the export_to_ibl function.") from e

# Output folder checks
if isinstance(output_folder, str):
output_folder = Path(output_folder)
Expand Down

0 comments on commit 5f0771b

Please sign in to comment.