-
Notifications
You must be signed in to change notification settings - Fork 902
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
BUG: exception was ignored while fetching the attribute __array_interface__ #2013
Comments
On further inspection, this issue may need to be fixed in Shapely, see shapely/shapely#1173 |
Thanks for the report! This shows up in our CI as well. The optimal solution would be to fast track shapely 2.0 but I understand that will not happen :). I guess the best way is to switch to |
As we are already silencing Shapely deprecation warnings for Shapely 1.8+, we can also silence the numpy warning for older Shapely releases (it can reuse the same context manager that is used throughout our code base). -> #2072 For some more context see numpy/numpy#17965, numpy/numpy#18197 (they initially raise an error instead of a warning) |
This issue is essentially described here.
In a miniconda environment on any OS using a conda-forge channel with geopandas 0.9.0, shapely 1.7.1, pygeos 0.10.1 and numpy 1.21.0, take this example
test_numpy_dep.py
script:and run it via
python -W all test_numpy_dep.py
. The console will be flooded one warning per geometry, each showing:(similar on Linux, I'm just happen to be sitting at Windows desktop now).
The relevant NumPy release note is titled "Exceptions will be raised during array-like creation". I'll admit I don't 100% follow the expected changes.
Note there is a related shapely deprecation warning, see #1659. Also, shapely 1.8 (not released yet) will deprecate the array interface.
Output of
geopandas.show_versions()
The text was updated successfully, but these errors were encountered: