Created
February 6, 2023 07:26
-
-
Save eddiebergman/f2424ccbd37d90d815e727a0ad708bfa to your computer and use it in GitHub Desktop.
Case for not using `np.random.seed`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
np.random.seed(1) | |
print("My code", np.random.choice([1,2,3,4,5])) | |
# My code 4 | |
# Update library | |
np.random.seed(1) | |
# Library adds in a new bit of randomness | |
print("Updated library", np.random.choice([1,2,3,4,5]) | |
# Updated library 4 | |
print("My code", np.random.choice([1,2,3,4,5])) | |
# My code 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment