Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created Sep 8, 2020
Embed
What would you like to do?
import numpy as np
import random
def generateParents(size):
parents = np.array(random.randint(0, 2**size - 1))
for i in range(1, population):
parents = np.append(parents, random.randint(0, 2**size - 1))
return parents
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment