-
Notifications
You must be signed in to change notification settings - Fork 392
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeWarning: invalid value encountered in cast multiarray.copyto(a, fill_value, casting='unsafe') #611
Comments
Can you post the warning you are receiving here as well? (+1 on the compatabilty issues. I have not looked into the numpy changelog yet and see what changes for pymoo) |
Hey Julian, I appreciate the response. The full warning is this: |
I am not able to reproduce this warning. What OS are you using? |
I am having the same warning as @alibaba613. Found out it comes from the line 56 in the file non_dominated_sorting.py: An example with n=5 will give that:
It could be easily fixed by replacing 1e16 by some high int value. |
To fix issue anyoptimization#611
Fixing error anyoptimization#611
I created a subclass of the NonDominatedSorting class from the pymoo library and overrode the
|
just to make sure, you're saying switching 1e16 to 10000000000000 didn't work? It worked perfectly for me. I don't know how sensitive |
I keep getting this warning (it links to the numpy folder on my laptop). I was using an outdated version of numpy and updated it to 1.26.2, but the problem persisted for both. I'm avoiding updating to numpy 2.0 to avoid huge compatibility issues with other packages.
This is the test problem:
The warning only appears when I use NSGA3 or UNSGA3, and not NSGA2. It should be noted that the warning also only appears on the first run, and not any other subsequent runs unless I restart the Jupyter Notebook kernel.
Considering the problem I'm using actually requires ~9 hours to run, I wanted to ask if it is necessary to run the quick dtlz1 beforehand just to fix the warning before running my main problem, or if it isn't something I should worry about.
The text was updated successfully, but these errors were encountered: