Skip to content

Commit b7b73f7

Browse files
committed
Enable TestCorrcoef scope
1 parent 2ac4f94 commit b7b73f7

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/third_party/cupy/statistics_tests/test_correlation.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
from tests.third_party.cupy import testing
99

1010

11-
@pytest.mark.skip("dpnp.corrcoef() is not implemented yet")
1211
class TestCorrcoef(unittest.TestCase):
1312

1413
@testing.for_all_dtypes()
@@ -43,7 +42,13 @@ def test_corrcoef_rowvar(self, xp, dtype):
4342
def test_corrcoef_dtype(self, xp, dtype):
4443
a = testing.shaped_arange((2, 3), xp, dtype)
4544
y = testing.shaped_arange((2, 3), xp, dtype)
46-
return xp.corrcoef(a, y=y, dtype=dtype)
45+
try:
46+
res = xp.corrcoef(a, y=y, dtype=dtype)
47+
except ValueError as e:
48+
if xp is cupy: # dpnp raises ValueError(...)
49+
raise TypeError(e)
50+
raise
51+
return res
4752

4853

4954
class TestCov(unittest.TestCase):

0 commit comments

Comments
 (0)