Skip to content

Commit 44681b6

Browse files
committed
Only test sparse when it can actually be imported.
1 parent 9c40867 commit 44681b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/_helpers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
all_libraries.append('sparse')
1515

1616
def import_(library, wrapper=False):
17-
if library == 'cupy':
17+
# CuPy requires a GPU
18+
# `sparse` has a dependency conflict with NumPy 1.21
19+
if library in {'cupy', 'sparse'}:
1820
pytest.importorskip(library)
1921
if wrapper:
2022
if 'jax' in library:

0 commit comments

Comments
 (0)