Skip to content

Commit 515e51a

Browse files
committed
Skip test_lsqr_calc_var under CuPy backend
The test compares against scipy's lsqr as reference; scipy cannot implicitly convert cupy arrays (TypeError), so guard it with the same TEST_CUPY_PYLOPS skipif used by test_lsqr_pylops_scipy.
1 parent 80b3eea commit 515e51a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pytests/test_solver.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,9 @@ def test_lsqr_pylops_scipy(par):
377377
assert_array_almost_equal(xinv_sp, x, decimal=4)
378378

379379

380+
@pytest.mark.skipif(
381+
int(os.environ.get("TEST_CUPY_PYLOPS", 0)) == 1, reason="Not CuPy enabled"
382+
)
380383
@pytest.mark.parametrize("par", [(par3), (par4)])
381384
def test_lsqr_calc_var(par):
382385
"""LSQR ``var`` estimates the diagonal of (A^H A)^-1 element-wise.

0 commit comments

Comments
 (0)