diff options
Diffstat (limited to 'ot/utils.py')
-rw-r--r-- | ot/utils.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ot/utils.py b/ot/utils.py index 16862ea..17983f2 100644 --- a/ot/utils.py +++ b/ot/utils.py @@ -15,7 +15,10 @@ import numpy as np from scipy.spatial.distance import cdist import sys import warnings - +try: + from inspect import signature +except ImportError: + from .externals.funcsigs import signature __time_tic_toc = time.time() @@ -335,10 +338,7 @@ class BaseEstimator(object): @classmethod def _get_param_names(cls): """Get parameter names for the estimator""" - try: - from inspect import signature - except ImportError: - from .externals.funcsigs import signature + # fetch the constructor or the original constructor before # deprecation wrapping if any init = getattr(cls.__init__, 'deprecated_original', cls.__init__) |