Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings #70

Merged
merged 7 commits into from
Jan 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Raise if cupy is installed but cuda isn't
loganbvh committed Jan 30, 2024
commit d52ceace9166476b2a100c858062d5ebc754a7e2
5 changes: 3 additions & 2 deletions tdgl/finite_volume/operators.py
Original file line number Diff line number Diff line change
@@ -6,10 +6,11 @@

try:
import cupy # type: ignore
from cupyx.scipy.sparse import csc_matrix, csr_matrix # type: ignore
from cupyx.scipy.sparse.linalg import factorized # type: ignore
except ImportError:
cupy = None
else:
from cupyx.scipy.sparse import csc_matrix, csr_matrix # type: ignore
from cupyx.scipy.sparse.linalg import factorized # type: ignore

Check warning on line 13 in tdgl/finite_volume/operators.py

Codecov / codecov/patch

tdgl/finite_volume/operators.py#L12-L13

Added lines #L12 - L13 were not covered by tests

from ..solver.options import SparseSolver
from .mesh import Mesh