-
Notifications
You must be signed in to change notification settings - Fork 78
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
Explicitly set nopython=False in numba.jit #535
Conversation
Codecov Report
@@ Coverage Diff @@
## main #535 +/- ##
=======================================
+ Coverage 79.9% 79.9% +0.1%
=======================================
Files 113 113
Lines 13135 13133 -2
=======================================
+ Hits 10491 10498 +7
+ Misses 2644 2635 -9
|
thanks for this! |
It was apparent that some functions inside alpha_shapes.py already carry a I.e.: libpysal/libpysal/cg/alpha_shapes.py Lines 77 to 78 in a2e3902
libpysal/libpysal/cg/alpha_shapes.py Lines 129 to 130 in a2e3902
libpysal/libpysal/cg/alpha_shapes.py Lines 682 to 683 in a2e3902
These are not changed by this PR. However, someone more knowledgeable in numba and in this project should review and decide, whether the lines where I now specified |
voronoi.py imports geopandas (if available) and creates geodataframes, where a `'geometry'` column is manually assigned. This will lead to errors with future versions of geopandas. ``` libpysal/cg/voronoi.py:173: FutureWarning: You are adding a column named 'geometry' to a GeoDataFrame constructed without an active geometry column. Currently, this automatically sets the active geometry column to 'geometry' but in the future that will no longer happen. Instead, either provide geometry to the GeoDataFrame constructor (GeoDataFrame(... geometry=GeoSeries()) or use `set_geometry('geometry')` to explicitly set the active geometry column. ``` Instead, the geodataframe geometry is now specified in the gdf creation via `gpd.GeoDataFrame(geometry = gpd.GeoSeries( ...`
I added one more commit to the PR regarding another deprecation warning: voronoi.py imports geopandas (if available) and creates geodataframes, where a
Instead, the geometry is now specified in the gdf creation via Please review, |
|
the default is switching from nopython=False to nopython=True, so these are the ones that raise the warning. In the upcoming versions of numba, the default will switch so the tests will fail for anything that requires python (I played around with this in esda yesterday, and i actually couldn't induce any failures when setting |
actually, both,
and
But also for me, no matter what way I set them, there are no severe problems. Just the warnings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
explicit is better than implicit, so we'll want to include nopython=False
anyway. I vote to merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's give it a go. We can always revise that if it causes issues (which it should not imho).
Hello! Please make sure to check all these boxes before submitting a Pull Request
(PR). Once you have checked the boxes, feel free to remove all text except the
justification in point 5.
pytest
on your changes. Continuous integration will be run on all PRs with GitHub Actions, but it is good practice to test changes locally prior to a making a PR.pysal/master
branch.docstrings and
unittests?
reviewer and added relevant labels
@jit
decorators in alpha_shapes.py that are currently without any arguments now explicitly specifynopython=False
Closes #526