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

Refactor functions in join.py to accept GeoSeries Input #948

Merged

Conversation

isVoid
Copy link
Contributor

@isVoid isVoid commented Feb 21, 2023

Description

This PR refactors all functions in join.py to accept GeoSeries as input.
closes #940, closes #939, closes #941, closes #942

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@isVoid isVoid requested a review from a team as a code owner February 21, 2023 22:30
@isVoid isVoid requested a review from thomcom February 21, 2023 22:30
@isVoid isVoid self-assigned this Feb 21, 2023
@github-actions github-actions bot added the Python Related to Python code label Feb 21, 2023
@isVoid isVoid added improvement Improvement / enhancement to an existing function 3 - Ready for Review Ready for review by team non-breaking Non-breaking change labels Feb 21, 2023
Comment on lines +328 to +329
@cuda.jit
def binarize(in_col, out, width):
Copy link
Member

Choose a reason for hiding this comment

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

Whoah. Shoud we move this stuff to libcuspatial?

Copy link
Contributor Author

@isVoid isVoid Feb 22, 2023

Choose a reason for hiding this comment

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

Does this benefit libcuSpatial? I don't see a usage of this other than converting the result of Point in Polygon to dataframe.

Copy link
Member

Choose a reason for hiding this comment

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

Doing it faster benefits cuSpatial users. Generally Numba and Python add a lot of overhead.

Copy link
Contributor Author

@isVoid isVoid Feb 23, 2023

Choose a reason for hiding this comment

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

Can probably punt to a future optimization. Another question is whether we should change the point in polygon interface, or simply leave this as a cuda kernel bind to python.

This might also have bigger question to do with the PiP interface: currently we use bits to encode the output - this is very efficient in memory but eventually we still need to convert them back to int8 arrays as shown here. If no one needs the memory saving benefit, should we keep it? Perhaps we should change the interface to return boolean array directly?

@isVoid
Copy link
Contributor Author

isVoid commented Feb 23, 2023

/merge

@rapids-bot rapids-bot bot merged commit 8e22478 into rapidsai:branch-23.04 Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Related to Python code
Projects
Status: Todo
3 participants