Skip to content
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

Change import to support shapely 1 and 2. #298

Merged
merged 1 commit into from
Sep 5, 2023
Merged

Conversation

huard
Copy link
Contributor

@huard huard commented Sep 5, 2023

We didn't test with shapely < 2, and turns out one import statement breaks.

Should fix #296

@@ -8,7 +8,7 @@
import numpy as np
import sparse as sps
import xarray as xr
from shapely import LineString
from shapely.geometry import LineString
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did not see any deprecation warning when importing like this, so I guess it is safe enough!

@ocefpaf ocefpaf merged commit c957de7 into master Sep 5, 2023
10 checks passed
@ocefpaf ocefpaf deleted the shapely_compat branch September 5, 2023 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ImportError: cannot import name 'LineString' from 'shapely' (~/site-packages/shapely/__init__.py)
2 participants