Commit 9e5b0e6
resolves the ValueError: Unable to avoid copy while creating an array (#7831)
* Fix argument passing in stratified shuffle split
NumPy 2.0 changed the behavior of the `copy=False` parameter to be stricter. When `train_test_split` converted Arrow arrays to NumPy format for stratification, it triggered this error for non-contiguous arrays. Using `np.asarray()` allows copying when necessary, which is the recommended migration path per NumPy 2.0 documentation.
* make style
---------
Co-authored-by: Quentin Lhoest <[email protected]>1 parent 627ed2e commit 9e5b0e6
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4868 | 4868 | | |
4869 | 4869 | | |
4870 | 4870 | | |
4871 | | - | |
| 4871 | + | |
4872 | 4872 | | |
4873 | 4873 | | |
4874 | 4874 | | |
| |||
0 commit comments