Skip to content

Commit 5637172

Browse files
committed
Add patch for scikit-learn 1.7.0
1 parent a1f6103 commit 5637172

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

graalpython/lib-graalpython/patches/metadata.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,17 @@ version = '~= 0.11.0'
729729
patch = 'scikit-build-core.patch'
730730
license = 'Apache-2.0'
731731

732+
[[scikit-learn.rules]]
733+
version = '> 1.7.0'
734+
# 1.7.0 patch got upstreamed
735+
install-priority = 2
736+
737+
[[scikit-learn.rules]]
738+
version = '== 1.7.0'
739+
patch = 'scikit-learn-1.7.0.patch'
740+
license = 'BSD-3-Clause'
741+
dist-type = 'sdist'
742+
732743
[[scikit-learn.rules]]
733744
version = '== 1.5.2'
734745
patch = 'scikit-learn-1.5.2.patch'
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git a/sklearn/datasets/_svmlight_format_fast.pyx b/sklearn/datasets/_svmlight_format_fast.pyx
2+
index 76a5954..0cc4424 100644
3+
--- a/sklearn/datasets/_svmlight_format_fast.pyx
4+
+++ b/sklearn/datasets/_svmlight_format_fast.pyx
5+
@@ -78,8 +78,7 @@ def _load_svmlight_file(f, dtype, bint multilabel, bint zero_based,
6+
if n_features and features[0].startswith(qid_prefix):
7+
_, value = features[0].split(COLON, 1)
8+
if query_id:
9+
- query.resize(len(query) + 1)
10+
- query[len(query) - 1] = np.int64(value)
11+
+ query = np.append(query, np.int64(value))
12+
features.pop(0)
13+
n_features -= 1
14+

0 commit comments

Comments
 (0)