ctlab / GADMA

Genetic Algorithm for Demographic Model Analysis
Other
47 stars 14 forks source link

global optimizer falls with an error #50

Closed dingearteom closed 3 years ago

dingearteom commented 3 years ago

Global optimizer that I get with get_global_optimizer('Genetic_algorithm') falls when I call opt.optimize in place where function is cached. Link to a notebook with an issue: https://disk.yandex.ru/d/w6KyNvY11JKtbw

noscode commented 3 years ago

Hi @dingearteom,

Thank you very much for the bug report. I have checked the notebook and reproduced the error. It was caused by numpy version that does not allow to call np.exp and np.log from numpy.ndarray(dtype=object). Unfortunately GADMA generates such arrays and it falls into error in deminf-data package that you have used.

I have fixed transformations in deminf-data so they could take arrays with dtype=object and now you can update deminf-data repo and everything should work fine. I will try to fix this unnecessary generation of dtype=object in GADMA today and come back to you.

Ekaterina