diff --git a/wafo/gaussian.py b/wafo/gaussian.py index 2602cfc..d33dec1 100644 --- a/wafo/gaussian.py +++ b/wafo/gaussian.py @@ -4,13 +4,27 @@ from numpy import (r_, minimum, maximum, atleast_1d, atleast_2d, mod, ones, from numpy import triu from scipy.special import ndtr as cdfnorm, ndtri as invnorm from scipy.special import erfc -from wafo import mvn -import numpy as np -import wafo.mvnprdmod as mvnprdmod -import wafo.rindmod as rindmod import warnings +import numpy as np from wafo.misc import common_shape +try: + import mvn # @UnresolvedImport +except ImportError: + warnings.warn('mvn not found. Check its compilation.') + mvn = None +try: + import mvnprodmod # @UnresolvedImport +except ImportError: + warnings.warn('mvnprodmod not found. Check its compilation.') + mvnprodmod = None +try: + import rindmod # @UnresolvedImport +except ImportError: + warnings.warn('rindmod not found. Check its compilation.') + rindmod = None + + __all__ = ['Rind', 'rindmod', 'mvnprdmod', 'mvn', 'cdflomax', 'prbnormtndpc', 'prbnormndpc', 'prbnormnd', 'cdfnorm2d', 'prbnorm2d', 'cdfnorm', 'invnorm', 'test_docstring'] diff --git a/wafo/misc.py b/wafo/misc.py index c6f1be3..6c8c7d5 100644 --- a/wafo/misc.py +++ b/wafo/misc.py @@ -18,11 +18,10 @@ import warnings from time import strftime, gmtime from plotbackend import plotbackend from collections import OrderedDict - - try: import c_library as clib # @UnresolvedImport -except: +except ImportError: + warnings.warn('c_library not found. Check its compilation.') clib = None floatinfo = finfo(float) _TINY = np.finfo(float).tiny