Skip to content

Commit

Permalink
fixing logic in cupy/cusignal_enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-rakowski committed Dec 12, 2023
1 parent 62107ea commit eb40fca
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions pylops/utils/deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,14 +255,12 @@ def cusignal_import(message: Optional[str] = None):


cupy_enabled = (
True
if (cupy_import() is not None and int(os.getenv("CUPY_PYLOPS", 1)) == 1)
else False # noqa:F821,E501
True if (cupy_import() is None and int(os.getenv("CUPY_PYLOPS", 1)) == 1) else False
)
cusignal_enabled = (
True
if (cusignal_import() is not None and int(os.getenv("CUSIGNAL_PYLOPS", 1)) == 1)
else False # noqa:F821,E501
if (cusignal_import() is None and int(os.getenv("CUSIGNAL_PYLOPS", 1)) == 1)
else False
)
# cusignal_enabled = check_module_enabled("cusignal", "CUSIGNAL_PYLOPS")
devito_enabled = util.find_spec("devito") is not None
Expand Down

0 comments on commit eb40fca

Please sign in to comment.