Skip to content

Commit

Permalink
Patch Numba Dep (#167)
Browse files Browse the repository at this point in the history
* allow linelabels, bulk_stability

* cover

* docs

* njit

* njit
  • Loading branch information
jmmshn authored Jan 11, 2024
1 parent a28b25a commit eaacfa2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion pymatgen/analysis/defects/recombination.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,19 @@
from typing import TYPE_CHECKING

import numpy as np
from numba import njit
from scipy.interpolate import PchipInterpolator

from .constants import AMU2KG, ANGS2M, EV2J, HBAR_EV, HBAR_J, KB, LOOKUP_TABLE

try:
from numba import njit
except ImportError:

def njit(*args, **kwargs):
"""Dummy decorator for njit."""
return lambda func: func


if TYPE_CHECKING:
from numpy import typing as npt

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ dev = ["pre-commit>=2.12.1"]
docs = [
"jupyter-book>=0.13.1",
]
pydefect = ["pydefect>=0.6.2"]
optional = ["pydefect>=0.6.2", "dscribe>=2.0.0", "numba"]

strict = [
"pymatgen==2023.10.11",
Expand Down

0 comments on commit eaacfa2

Please sign in to comment.