Skip to content

Commit

Permalink
check for kwant dependency at init
Browse files Browse the repository at this point in the history
  • Loading branch information
piskunow committed Dec 22, 2023
1 parent 6113500 commit e9a7cb5
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/kpm_tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
"""KPM Tools."""
# flake8: noqa
try:
import kwant
except ImportError:
raise ImportError(
"Missing dependency 'kwant'. Please install it manually. "
"Visit https://kwant-project.org/ for installation instructions."
)
from .bloch import _hopping_distance
from .bloch import separate_bloch_components
from .bloch import wrap_distance
Expand Down

0 comments on commit e9a7cb5

Please sign in to comment.