def test_random_permutation():
 n_samples = 10
 random_state = 42
 python_randperm = random_permutation(n_samples, random_state)
 matlab_randperm = np.array([7, 6, 5, 1, 4, 9, 10, 3, 8, 2])
 assert_array_equal(python_randperm, (matlab_randperm - 1))

def test_random_permutation ( ) : n_samples = 10 random_state = 42 python_randperm = random_permutation ( n_samples , random_state ) matlab_randperm = np . array ( [ 7 , 6 , 5 , 1 , 4 , 9 , 10 , 3 , 8 , 2 ] ) assert_array_equal ( python_randperm , ( matlab_randperm - 1 ) )
test random permutation function .