We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d62f4f4 + ce89a2d commit 992c2cbCopy full SHA for 992c2cb
1 file changed
pylops/utils/backend.py
@@ -114,9 +114,9 @@ def get_module_name(mod: ModuleType) -> str:
114
"""
115
if mod == np:
116
backend = "numpy"
117
- elif mod == cp:
+ elif deps.cupy_enabled and mod == cp:
118
backend = "cupy"
119
- elif mod == jnp:
+ elif deps.jax_enabled and mod == jnp:
120
backend = "jax"
121
else:
122
raise ValueError("module must be numpy, cupy, or jax")
0 commit comments