Skip to content

Commit 40ede02

Browse files
TEST: enabled third_party cupy tests for distributions check 2 (#348)
* TEST: enabled third_party cupy tests for distributions check 2
1 parent d7bbf5c commit 40ede02

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

tests/skipped_tests_gpu.tbl

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,10 +1505,6 @@ tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta
15051505
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_3_{a_shape=(), b_shape=(3, 2), shape=(3, 2)}::test_beta
15061506
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_4_{a_shape=(3, 2), b_shape=(), shape=(4, 3, 2)}::test_beta
15071507
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsBeta_param_5_{a_shape=(3, 2), b_shape=(), shape=(3, 2)}::test_beta
1508-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsChisquare_param_0_{df_shape=(), shape=(4, 3, 2)}::test_chisquare
1509-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsChisquare_param_1_{df_shape=(), shape=(3, 2)}::test_chisquare
1510-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsChisquare_param_2_{df_shape=(3, 2), shape=(4, 3, 2)}::test_chisquare
1511-
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsChisquare_param_3_{df_shape=(3, 2), shape=(3, 2)}::test_chisquare
15121508
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsDirichlet_param_0_{alpha_shape=(3,), shape=(4, 3, 2, 3)}::test_dirichlet
15131509
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsDirichlet_param_1_{alpha_shape=(3,), shape=(3, 2, 3)}::test_dirichlet
15141510
tests/third_party/cupy/random_tests/test_distributions.py::TestDistributionsExponentialError::test_negative_scale

tests/third_party/cupy/random_tests/test_distributions.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,16 @@ def test_binomial(self, n_dtype, p_dtype):
7171
@testing.gpu
7272
class TestDistributionsChisquare(unittest.TestCase):
7373

74-
def check_distribution(self, dist_func, df_dtype, dtype):
74+
def check_distribution(self, dist_func, df_dtype):
7575
df = cupy.full(self.df_shape, 5, dtype=df_dtype)
76-
out = dist_func(df, self.shape, dtype)
76+
out = dist_func(df, self.shape)
7777
self.assertEqual(self.shape, out.shape)
78-
self.assertEqual(out.dtype, dtype)
78+
# numpy and dpdp output dtype is float64
79+
self.assertEqual(out.dtype, numpy.float64)
7980

8081
@helper.for_float_dtypes('df_dtype')
81-
@helper.for_float_dtypes('dtype')
82-
def test_chisquare(self, df_dtype, dtype):
83-
self.check_distribution(_distributions.chisquare, df_dtype, dtype)
82+
def test_chisquare(self, df_dtype):
83+
self.check_distribution(_distributions.chisquare, df_dtype)
8484

8585

8686
@testing.parameterize(*testing.product({

0 commit comments

Comments
 (0)