diff --git a/nanopq/convert_faiss.py b/nanopq/convert_faiss.py index 251c7da..27eaa55 100644 --- a/nanopq/convert_faiss.py +++ b/nanopq/convert_faiss.py @@ -1,5 +1,5 @@ # Try to import faiss -import importlib +import importlib.util spec = importlib.util.find_spec("faiss") if spec is None: pass # If faiss hasn't been installed. Just skip diff --git a/tests/test_convert_faiss.py b/tests/test_convert_faiss.py index b0caa14..7b1de08 100644 --- a/tests/test_convert_faiss.py +++ b/tests/test_convert_faiss.py @@ -6,7 +6,7 @@ import unittest import numpy as np -import importlib +import importlib.util spec = importlib.util.find_spec("faiss") if spec is None: raise unittest.SkipTest("Cannot find the faiss module. Skipt the test for convert_faiss")