Created
December 11, 2017 00:00
-
-
Save fedden/458931ffdccc8af76601dbd9671a32fc to your computer and use it in GitHub Desktop.
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
| def create_random_population(size): | |
| pop = [] | |
| for _ in range(size): | |
| dna = np.arange(1, 11) | |
| np.random.shuffle(dna) | |
| pop.append(dna) | |
| return np.array(pop) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment