Skip to content

MAINT Remove -Wcpp warnings when compiling _kd_tree and _ball_tree #24965

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

Merged
merged 6 commits into from
Dec 7, 2022

Conversation

Vincent-Maladiere
Copy link
Contributor

Reference Issues/PRs

Towards #24875

What does this implement/fix? Explain your changes.

  • Replace cnp.ndarray by memoryviews in sklearn/neighbors/_binary_tree.pxi so that _kd_tree and _ball_tree use the new numpy API
  • Replace deprecated cnp.NPY_OWNDATA by cnp.NPY_ARRAY_OWNDATA

Any other comments?

Copy link
Member

@jjerphan jjerphan left a comment

Choose a reason for hiding this comment

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

LGTM modulo a few comments.

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

LGTM once the points raised by @jjerphan have been taken care of.

Copy link
Member

@jjerphan jjerphan left a comment

Choose a reason for hiding this comment

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

I think this PR better be merged in the current state; see my comment.

@Vincent-Maladiere
Copy link
Contributor Author

You're right, let's split this PR.

Copy link
Member

@jjerphan jjerphan left a comment

Choose a reason for hiding this comment

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

Looks good and mergeable to me. Thanks for splitting this PR in two with #25106, @Vincent-Maladiere.

I let @ogrisel merge if it LGTH.

@jjerphan
Copy link
Member

jjerphan commented Dec 7, 2022

Actually, I am merging this PR since I missed the remark in #24965.

@jjerphan jjerphan merged commit 5564541 into scikit-learn:main Dec 7, 2022
jjerphan pushed a commit to jjerphan/scikit-learn that referenced this pull request Jan 20, 2023
jjerphan pushed a commit to jjerphan/scikit-learn that referenced this pull request Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants