Fix deprecation warning with scikit-learn 0.21
@@ -12,6 +12,10 @@ from sklearn.metrics import pairwise_distances
from sklearn.preprocessing import normalize
from sklearn.neighbors import KDTree
+try:
+ from joblib
+except ImportError:
+ # sklearn.externals.joblib is deprecated in 0.21 and will be removed in 0.23
from sklearn.externals import joblib
import numpy as np
