初始化一个种群

def init_population(self):
    population = np.random.randint(low=self.ascii_bounder[0], high=self.ascii_bounder[1], 
                                   size=(self.n_population, self.password_size)).astype(np.uint8)
    return population
# 初始化一个种群 def init_populationself population = nprandomrandintlow=selfascii_bounder0 high=selfascii_bounder1 size=selfn_population selfpassword_sizeast

原文地址: https://www.cveoy.top/t/topic/b357 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录