anyoptimization / pymoo

NSGA2, NSGA3, R-NSGA3, MOEAD, Genetic Algorithms (GA), Differential Evolution (DE), CMAES, PSO
https://pymoo.org
Apache License 2.0
2.23k stars 381 forks source link

Fix compatibility with numpy 2.0 and allow use of last version of cma #639

Closed iglasser closed 1 month ago

iglasser commented 1 month ago

Make pymoo compatible with numpy 2.0 by :

Since pymoo is a library and is compatible with all cma versions between 3.2.2 to the latest version, the requirement has only been relaxed, so users are allowed to keep using cma 3.2.2 (together with older numpy versions) if they wish to.

Tests have been performed locally with Python 11, numpy 2.0.1 and cma 3.4.0.

Note that the tests done in the github workflow on the main branch fail. I have tested that no new errors have been introduced, but already existing errors remain present.

blankjul commented 1 month ago

Thanks for your contribution!

I had originally a greater dependency on cma and happy to have it again. However, I have gotten complains of changes and the code not working anymore and then to be on the safe side added ==.