def require_numpy(): global numpy if not numpy: try: import numpy except ImportError: error_missing_python_library("numpy")
def require_scipy(): require_numpy() global scipy if not scipy: try: import scipy import scipy.special import scipy.optimize except ImportError: error_missing_python_library("scipy")
def require_mpmath(): global mpmath if not mpmath: try: import mpmath except ImportError: error_missing_python_library("mpmath") if not hasattr(mpmath, 'besselj'): mpmath.besselj = mpmath.jn mpmath.mp.prec = 64