报错版本:python version:3.9.7
hyperopt version:0.2.7
报错代码段:rstate=RandomState(seed)
报错完整信息:
AttributeError: ‘numpy.random.mtrand.RandomState’ object has no attribute ‘integers’
解决方案:rstate=np.random.default_rng(seed)
问题根源:版本问题
报错版本:python version:3.9.7
hyperopt version:0.2.7
报错代码段:rstate=RandomState(seed)
报错完整信息:
AttributeError: ‘numpy.random.mtrand.RandomState’ object has no attribute ‘integers’
解决方案:rstate=np.random.default_rng(seed)
问题根源:版本问题