From 62107ea425fe615263ffd5c8a9280d1f9c0050fa Mon Sep 17 00:00:00 2001 From: alex-rakowski Date: Mon, 11 Dec 2023 22:52:59 -0800 Subject: [PATCH] adding message to be optional --- pylops/utils/deps.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pylops/utils/deps.py b/pylops/utils/deps.py index 1b917d3f..ab1c5c2b 100644 --- a/pylops/utils/deps.py +++ b/pylops/utils/deps.py @@ -15,9 +15,7 @@ # from importlib import import_module from importlib import util - -# from typing import Optional - +from typing import Optional # def check_module_enabled( # module: str, @@ -187,7 +185,7 @@ def sympy_import(message): return sympy_message -def cupy_import(message): +def cupy_import(message: Optional[str] = None): # detect if cupy should be importable cupy_test = ( util.find_spec("cupy") is not None and int(os.getenv("CUPY_PYLOPS", 1)) == 1 @@ -221,7 +219,7 @@ def cupy_import(message): return cupy_message -def cusignal_import(message): +def cusignal_import(message: Optional[str] = None): # detect if cupy should be importable cusignal_test = ( util.find_spec("cusignal") is not None