File tree Expand file tree Collapse file tree
python/cuml/cuml/manifold Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616
1717# distutils: language = c++
1818
19- from cuml.internals.safe_imports import cpu_only_import, safe_import_from
19+ from cuml.internals.safe_imports import cpu_only_import
2020np = cpu_only_import(' numpy' )
2121pd = cpu_only_import(' pandas' )
22- nearest_neighbors = safe_import_from(' umap.umap_' , ' nearest_neighbors' )
23- DISCONNECTION_DISTANCES = safe_import_from(' umap.umap_' , ' DISCONNECTION_DISTANCES' )
2422
2523import joblib
2624import warnings
@@ -917,6 +915,7 @@ class UMAP(UniversalBase,
917915
918916 @property
919917 def _disconnection_distance (self ):
918+ from umap.umap_ import DISCONNECTION_DISTANCES
920919 self .disconnection_distance = DISCONNECTION_DISTANCES.get(self .metric, np.inf)
921920 return self .disconnection_distance
922921
@@ -925,6 +924,7 @@ class UMAP(UniversalBase,
925924 self .disconnection_distance = value
926925
927926 def gpu_to_cpu (self ):
927+ from umap.umap_ import nearest_neighbors
928928 if hasattr (self , ' knn_dists' ) and hasattr (self , ' knn_indices' ):
929929 self ._knn_dists = self .knn_dists
930930 self ._knn_indices = self .knn_indices
You can’t perform that action at this time.
0 commit comments