Repository navigation
BUG: r2_score was raising unnecessarily for pyarrow chunkedarray input - #33996
Merged
Merged
Conversation
lorentzenchr
approved these changes
May 12, 2026
lorentzenchr
left a comment
Member
There was a problem hiding this comment.
The fix is correct. The test should be improved imo.
@MarcoGorelli thanks a lot
|
|
||
| if nw.dependencies.is_into_dataframe(x) or nw.dependencies.is_into_series(x): | ||
| return nw.from_native(x).shape[0] | ||
| return nw.from_native(x, allow_series=True).shape[0] |
Member
There was a problem hiding this comment.
That’s for sure the right fix.
MarcoGorelli
commented
May 12, 2026
MarcoGorelli
marked this pull request as ready for review
May 12, 2026 10:05
lorentzenchr
left a comment
Member
There was a problem hiding this comment.
Sorry, this review comment should have been included in my 1. reciew.
| assert_allclose(result, [False, True, True, False]) | ||
|
|
||
|
|
||
| def test_r2_score_pa_chunked_array(): |
Member
There was a problem hiding this comment.
We don‘t need r2_score. We can test _num_samples with a chunked array directly.
1 task done
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.
closes #33993
I haven't added a whatsnew note, because this addresses a regression introduced in #31127, which has not yet made its way into a release
Reference Issues/PRs
What does this implement/fix? Explain your changes.
AI usage disclosure
I used AI assistance for:
Any other comments?