I'm converting Matlab program to Python.
I'm trying to random sampling from an array by using np.random.choice, but the result doesn't match with Matlab randsample.
For example,
I did this with Python,
np.random.seed(100)
a = np.arange(10, 110, 10)
np.random.choice(a, 2, True)
>> Output: array([90, 90])
And the following is Matlab,
rng(100)
a = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100]
randsample(a, 2, true)
>> Output: 60 30
Values in both arrays are different. Am I doing something wrong?
Any help will be appreciated, Thanks!