Skip to content

Instantly share code, notes, and snippets.

@fedden
Created December 11, 2017 00:00
Show Gist options
  • Select an option

  • Save fedden/458931ffdccc8af76601dbd9671a32fc to your computer and use it in GitHub Desktop.

Select an option

Save fedden/458931ffdccc8af76601dbd9671a32fc to your computer and use it in GitHub Desktop.
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