diff options
author | MathieuCarriere <mathieu.carriere3@gmail.com> | 2022-11-21 23:40:07 +0100 |
---|---|---|
committer | MathieuCarriere <mathieu.carriere3@gmail.com> | 2022-11-21 23:40:07 +0100 |
commit | 6341afeb3e4c14cb1e3dc7a4fe0716d213227bf6 (patch) | |
tree | 929b411dae0c80ffa74e2bb271539bd8e2c7607d /src/python/gudhi/representations | |
parent | ffdbd5ced452530c8ee63a50d5bdf1fe797679a9 (diff) | |
parent | 2752ead7b1db5895064f9bb72f81e6e928fcaf7c (diff) |
Merge branch 'master' of https://github.com/GUDHI/gudhi-devel into perslay
Diffstat (limited to 'src/python/gudhi/representations')
-rw-r--r-- | src/python/gudhi/representations/vector_methods.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/python/gudhi/representations/vector_methods.py b/src/python/gudhi/representations/vector_methods.py index a169aee8..d52185ef 100644 --- a/src/python/gudhi/representations/vector_methods.py +++ b/src/python/gudhi/representations/vector_methods.py @@ -13,8 +13,13 @@ import numpy as np from sklearn.base import BaseEstimator, TransformerMixin from sklearn.exceptions import NotFittedError from sklearn.preprocessing import MinMaxScaler, MaxAbsScaler -from sklearn.neighbors import DistanceMetric from sklearn.metrics import pairwise +try: + # New location since 1.0 + from sklearn.metrics import DistanceMetric +except ImportError: + # Will be removed in 1.3 + from sklearn.neighbors import DistanceMetric from .preprocessing import DiagramScaler, BirthPersistenceTransform |