Skip to content

Commit 6a8b0c1

Browse files
committed
REF: Simplify numba compat
1 parent 4f43914 commit 6a8b0c1

1 file changed

Lines changed: 2 additions & 8 deletions

File tree

arch/compat/numba.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,18 @@
44

55
from arch.utility.exceptions import PerformanceWarning
66

7-
try:
8-
import numba # noqa
9-
10-
HAS_NUMBA = True
11-
except ImportError:
12-
HAS_NUMBA = False
13-
147
DISABLE_NUMBA = os.environ.get("ARCH_DISABLE_NUMBA", False) in ("1", "true", "True")
158

169
performance_warning: str = """
1710
numba is not available, and this function is being executed without JIT
1811
compilation. Either install numba or reinstalling after installing Cython
1912
is strongly recommended."""
2013

14+
HAS_NUMBA = False
2115
try:
2216
if DISABLE_NUMBA:
2317
raise ImportError
24-
18+
HAS_NUMBA = True
2519
from numba import jit
2620

2721
jit = functools.partial(jit, nopython=True)

0 commit comments

Comments
 (0)