Skip to content

Commit 3ef0c3a

Browse files
committed
Add a test to cover the change
1 parent d4aea9f commit 3ef0c3a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

dpnp/tests/test_random_state.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,3 +1115,13 @@ def test_invalid_dtype(self, dtype):
11151115
def test_invalid_usm_type(self, usm_type):
11161116
# dtype must be float32 or float64
11171117
assert_raises(ValueError, RandomState().uniform, usm_type=usm_type)
1118+
1119+
def test_size_castable_to_integer(self):
1120+
M = numpy.int64(31)
1121+
N = numpy.int64(31)
1122+
K = 63 # plain Python int
1123+
1124+
sizes = [(M, K), (M, N), (K, N)]
1125+
for size in sizes:
1126+
result = RandomState().uniform(size=size)
1127+
assert result.shape == size

0 commit comments

Comments
 (0)