Skip to content

Commit

Permalink
fix: igor2 does not have to be installed on import time
Browse files Browse the repository at this point in the history
  • Loading branch information
kmnhan committed Apr 3, 2024
1 parent d4925f4 commit 186727a
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions src/erlab/io/igor.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,19 @@
import numpy as np
import xarray as xr

import igor2.binarywave
import igor2.packed
import igor2.record
try:
import igor2.binarywave
import igor2.packed
import igor2.record

except ImportError:
import warnings

warnings.warn(
"igor2 is not installed. Some functions may not work.",
ImportWarning,
stacklevel=1,
)

__all__ = ["load_experiment", "load_h5", "load_wave", "load_pxp", "load_ibw"]

Expand Down

0 comments on commit 186727a

Please sign in to comment.