From 938fdf96dec34070342e7731756d9e93ea7746d6 Mon Sep 17 00:00:00 2001 From: Leon Avakyan Date: Tue, 1 Dec 2020 22:05:52 +0300 Subject: [PATCH] Allow to run without Numba The Numba requirement may repel people from using ScatterPy. This simple change makes Numba dependence optional. --- scatterpy/special.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scatterpy/special.py b/scatterpy/special.py index 530dc4a..475ba3b 100755 --- a/scatterpy/special.py +++ b/scatterpy/special.py @@ -11,10 +11,14 @@ calculations. """ -import numba as nb import numpy as np from scipy import special +try: + import numba as nb +except ImportError: + print('WARNING: Numba support is disabled in ScatterPy') + # special mathematical functions def sph_jn(n, z):