π Geometric Computer Vision Library for Spatial AI
Python artificial-intelligencecomputer-visiondeep-learninghacktoberfestimage-processingmachine-learningneural-networkpythonpytorchroboticsspatial-ai
fix: import the module within LazyLoader when an accessed dependency is installed (#3046)
Sam Armstrong23b7ccb99788
diff --git a/kornia/core/external.py b/kornia/core/external.pyindex a600eb352..8161d0546 100644--- a/kornia/core/external.py+++ b/kornia/core/external.py@@ -74,10 +74,12 @@ class LazyLoader:while to_ask:if if_install.lower() == "y" or if_install.lower() == "yes":self._install_package(self.module_name)+ self.module = importlib.import_module(self.module_name)to_ask = Falseelif if_install.lower() == "a" or if_install.lower() == "all":self.auto_install = Trueself._install_package(self.module_name)+ self.module = importlib.import_module(self.module_name)to_ask = Falseelif if_install.lower() == "n" or if_install.lower() == "no":raise ImportError(