We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f43914 commit 6a8b0c1Copy full SHA for 6a8b0c1
1 file changed
arch/compat/numba.py
@@ -4,24 +4,18 @@
4
5
from arch.utility.exceptions import PerformanceWarning
6
7
-try:
8
- import numba # noqa
9
-
10
- HAS_NUMBA = True
11
-except ImportError:
12
- HAS_NUMBA = False
13
14
DISABLE_NUMBA = os.environ.get("ARCH_DISABLE_NUMBA", False) in ("1", "true", "True")
15
16
performance_warning: str = """
17
numba is not available, and this function is being executed without JIT
18
compilation. Either install numba or reinstalling after installing Cython
19
is strongly recommended."""
20
+HAS_NUMBA = False
21
try:
22
if DISABLE_NUMBA:
23
raise ImportError
24
+ HAS_NUMBA = True
25
from numba import jit
26
27
jit = functools.partial(jit, nopython=True)
0 commit comments