Skip to content

Instantly share code, notes, and snippets.

@vinaykudari
Created July 24, 2018 10:19
Show Gist options
  • Save vinaykudari/c0352e3f44b0e6a87388514e2b0422a9 to your computer and use it in GitHub Desktop.
Save vinaykudari/c0352e3f44b0e6a87388514e2b0422a9 to your computer and use it in GitHub Desktop.
Random Seed
np.random.seed(25) #setting a seed
print(np.random.rand(3))
>> [0.87012414 0.58227693 0.27883894]
np.random.seed(25)
print(np.random.rand(3))
>> [0.87012414 0.58227693 0.27883894]
print(np.random.rand(3))
>> [0.52071879 0.32605113 0.69918624]
print(np.random.rand(3))
>> [0.36639455 0.83637451 0.48134294]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment