Skip to content

Commit c703097

Browse files
committed
test: skill all cond without uselobpcg for CuPy
1 parent bc9963b commit c703097

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

‎pytests/test_linearoperator.py‎

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -293,8 +293,6 @@ def test_eigs_square(par, symmetric):
293293
assert_array_almost_equal(eigs, diag[:3], decimal=3)
294294

295295
if backend == "numpy":
296-
# CuPy cannot compute a single eigenvalue for square,
297-
# non-symmetric matrix
298296
cond = Op.cond(backend=backend)
299297
assert_array_almost_equal(np.real(cond), nx, decimal=3)
300298

@@ -336,8 +334,9 @@ def test_eigs_square_hermitian(par, explicit):
336334
eigs = Op.eigs(neigs=3, symmetric=True, backend=backend) # top-k
337335
assert_array_almost_equal(eigs, eigs_true[:3], decimal=3)
338336

339-
cond = Op.cond(symmetric=True, backend=backend)
340-
assert_array_almost_equal(np.real(cond), nx, decimal=3)
337+
if backend == "numpy":
338+
cond = Op.cond(symmetric=True, backend=backend)
339+
assert_array_almost_equal(np.real(cond), nx, decimal=3)
341340

342341
# lobpcg
343342
eigs = Op.eigs(neigs=3, symmetric=True, uselobpcg=True, niter=100, backend=backend)
@@ -380,8 +379,6 @@ def test_eigs_non_square(par):
380379
assert_array_almost_equal(eigs, np.abs(diag)[:2], decimal=3)
381380

382381
if backend == "numpy":
383-
# CuPy cannot compute a single eigenvalue for square,
384-
# non-symmetric matrix
385382
cond = Op.cond(backend=backend)
386383
assert_array_almost_equal(np.real(cond), nx, decimal=3)
387384

@@ -399,8 +396,6 @@ def test_eigs_non_square(par):
399396
assert_array_almost_equal(eigs, np.abs(diag)[:3], decimal=3)
400397

401398
if backend == "numpy":
402-
# CuPy cannot compute a single eigenvalue for square,
403-
# non-symmetric matrix
404399
cond = Op.cond(backend=backend)
405400
assert_array_almost_equal(np.real(cond), nx, decimal=3)
406401

0 commit comments

Comments
 (0)