8000 test shuffle keyword · numpy/numpy@2e44812 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2e44812

Browse files
committed
test shuffle keyword
1 parent 47fd29d commit 2e44812

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

numpy/random/tests/test_generator_mt19937.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,9 @@ def test_choice_uniform_noreplace(self):
570570
actual = random.choice(4, 3, replace=False)
571571
desired = np.array([2, 0, 3], dtype=np.int64)
572572
assert_array_equal(actual, desired)
573+
actual = random.choice(4, 4, replace=False, shuffle=False)
574+
desired = np.arange(4, dtype=np.int64)
575+
assert_array_equal(actual, desired)
573576

574577
def test_choice_nonuniform_noreplace(self):
575578
random = Generator(MT19937(self.seed))

0 commit comments

Comments
 (0)
0