FIX Updated loop structure in hdbscan _tree.pyx to avoid error#26547
Merged
lesteve merged 3 commits intoscikit-learn:mainfrom Jun 9, 2023
Merged
FIX Updated loop structure in hdbscan _tree.pyx to avoid error#26547lesteve merged 3 commits intoscikit-learn:mainfrom
_tree.pyx to avoid error#26547lesteve merged 3 commits intoscikit-learn:mainfrom
Conversation
Contributor
Author
|
cc: @jeremiedbb @lesteve |
jeremiedbb
reviewed
Jun 8, 2023
Comment on lines
+257
to
+258
| for idx in range(PyArray_SHAPE(<cnp.PyArrayObject*> condensed_tree)[0]): | ||
| condensed_node = condensed_tree[idx] |
Member
There was a problem hiding this comment.
Why do you need that ? I'd expect condensed_tree.shape[0] to work
Contributor
Author
There was a problem hiding this comment.
With the new NumPy API the use of .shape errors.
See: #26385 (comment)
Member
|
Locally
Hmmm weird, out of curiosity can you elaborate on this? In particular how do we get a float instead of an int eventually? |
Member
|
Ooops sorry, this issue is about pypy. Since I was pinged, I thought this was about scipy-dev #26535 my bad 😅 ... |
Member
|
Merging, thanks! |
manudarmi
pushed a commit
to primait/scikit-learn
that referenced
this pull request
Jun 12, 2023
REDVM
pushed a commit
to REDVM/scikit-learn
that referenced
this pull request
Nov 16, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Fixes #26541
What does this implement/fix? Explain your changes.
For some reason, for-each style iteration of structured dtype numpy arrays no longer works. This PR replaces that loop usage with standard indexing. It may be worth investigating what caused it upstream.
Any other comments?