-
Notifications
You must be signed in to change notification settings - Fork 557
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 intersection on M1 Mac #2045
Comments
We have had several of such reports in the past (eg #1709, #1345 for some context). Most of them have been fixed in the meantime, and also typically involved some special case such as empty geometries as input or as result. Now, for this specific example, I can't reproduce this on Linux (Ubuntu), also using shapely 2.0.4 from conda-forge (using GEOS 3.12.1). |
I can reproduce that on M1. |
Hmm, then we will need someone with a (M1) Mac to debug this .. In the past, what I did to debug such warnings is building GEOS locally with the following snippet added somewhere:
(although now I am writing this, I am wondering if that would also work if you add that to ufuncs.c in shapely itself with a released build from GEOS, which would be easier). Now, that might be something gcc specific and not work with clang: https://stackoverflow.com/questions/37819235/how-do-you-enable-floating-point-exceptions-for-clang-in-os-x |
I did try to include the code above in shapely but it won't compile. And stuff that comes via Google search or that SO link is way beyond my understanding. The warning is reproducible in GitHub Actions but I understand that it is not the fastest way of development... |
Hmm... I've had some unit tests failing in another project since last week for macos with small differences in results for union,... operations. Apparently it is since macos-latest switched to macos14 on arm64 that they started failing, so it seems there are more differences that can be expected... |
Expected behavior and actual behavior.
intersection
unexpectedly raises a RuntimeWarning.This script:
should print
POINT (100 100)
without warnings. This works as expected on Intel macs. On M1 macs, the result is correct but I get a warning:Steps to reproduce the problem.
Full example here. The test runs on Github Actions on macos-13 (Intel) and macos-14 (M1) (https://github.com/emlys/demos/actions/runs/8913541967/job/24479230749).
Operating system
Mac OSX 14.4.1
Shapely version and provenance
2.0.4 from conda-forge
The text was updated successfully, but these errors were encountered: