Repository navigation
Update test case for numpy 2.4.6 - #40692
Conversation
There was a problem hiding this comment.
📋 Review Summary
This PR updates BaseMLTransformTest.test_ml_transform_dict_output_pcoll_schema in base_test.py to use explicit NumPy scalar types (np.int64(1) and np.float32(2.0)) instead of 1-D single-element arrays. This resolves a compatibility issue with NumPy 2.4.6+ where implicit conversion of 1-D arrays to scalars is disallowed when matching the scalar input_types schema.
🔍 General Feedback
- The change is clean, minimal, and accurately aligns the test input data with the declared scalar
input_types(np.int32andnp.float32).
💡 Tip: Comment /gemini review on this pull request to trigger a new Gemini code review.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #40692 +/- ##
=============================================
+ Coverage 56.16% 80.02% +23.85%
=============================================
Files 1124 490 -634
Lines 178336 82818 -95518
Branches 1489 0 -1489
=============================================
- Hits 100170 66274 -33896
+ Misses 75645 16544 -59101
+ Partials 2521 0 -2521
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Assigning reviewers: R: @shunping for label python. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
Numpy 2.4.6 does not allow for the conversion of 1-d arrays to scalars, which breaks this test case. Swaps to an explicit scalar which passes on all supported versions of numpy