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

MAINT: spatial: Change error message in KDTree to be more informative. #19391

Merged
merged 2 commits into from Oct 16, 2023

Conversation

E-W-Jones
Copy link
Contributor

Reference issue

Closes #19188

What does this implement/fix?

Based on the discussion in #19188, change the error message when calling KDTree with an invalid data array to make it clearer that data should be a 2D array, but the data in the array can be any dimension (1D, 2D, ...).

Additional information

I'm not sure if this is exactly what the people involved had in mind, but it's a quick and simple fix.

Based on the discussion in scipy#19188, change the error message to make it
clearer that we're dealing with a 2D numpy array, but the data in the
array can be any dimension (1D, 2D, ...).
Copy link
Member

@j-bowhay j-bowhay left a comment

Choose a reason for hiding this comment

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

Thanks @E-W-Jones, a minor style nit

Co-authored-by: Jake Bowhay <60778417+j-bowhay@users.noreply.github.com>
@j-bowhay j-bowhay changed the title DOC: Change error message in spatial.KDTree to be more informative. MAINT: spatial: Change error message in KDTree to be more informative. Oct 16, 2023
@j-bowhay j-bowhay added scipy.spatial maintenance Items related to regular maintenance tasks labels Oct 16, 2023
Copy link
Member

@j-bowhay j-bowhay left a comment

Choose a reason for hiding this comment

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

Thanks @E-W-Jones

@j-bowhay j-bowhay added this to the 1.12.0 milestone Oct 16, 2023
@j-bowhay j-bowhay merged commit 9deb854 into scipy:main Oct 16, 2023
21 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Items related to regular maintenance tasks scipy.spatial
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: 1D arrays with KDTree
2 participants