Skip to content

Commit 59c2917

Browse files
MNT Drop spurious commas
The extra commas are interpreted as a tuple.
1 parent 44d8cbd commit 59c2917

File tree

3 files changed

+20
-24
lines changed

3 files changed

+20
-24
lines changed

examples/ensemble/plot_bias_variance.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ def generate(n_samples, noise, n_repeat=1):
177177

178178
plt.subplot(2, n_estimators, n_estimators + n + 1)
179179
plt.plot(X_test, y_error, "r", label="$error(x)$")
180-
(plt.plot(X_test, y_bias, "b", label="$bias^2(x)$"),)
181-
(plt.plot(X_test, y_var, "g", label="$variance(x)$"),)
180+
plt.plot(X_test, y_bias, "b", label="$bias^2(x)$")
181+
plt.plot(X_test, y_var, "g", label="$variance(x)$")
182182
plt.plot(X_test, y_noise, "c", label="$noise(x)$")
183183

184184
plt.xlim([-5, 5])

sklearn/cross_decomposition/tests/test_pls.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -404,12 +404,12 @@ def test_copy(Est):
404404

405405
X_orig = X.copy()
406406
with pytest.raises(AssertionError):
407-
(pls.transform(X, Y, copy=False),)
407+
pls.transform(X, Y, copy=False)
408408
assert_array_almost_equal(X, X_orig)
409409

410410
X_orig = X.copy()
411411
with pytest.raises(AssertionError):
412-
(pls.predict(X, copy=False),)
412+
pls.predict(X, copy=False)
413413
assert_array_almost_equal(X, X_orig)
414414

415415
# Make sure copy=True gives same transform and predictions as predict=False

sklearn/utils/tests/test_seq_dataset.py

+16-20
Original file line numberDiff line numberDiff line change
@@ -154,34 +154,30 @@ def test_fused_types_consistency(dataset_32, dataset_64):
154154

155155
def test_buffer_dtype_mismatch_error():
156156
with pytest.raises(ValueError, match="Buffer dtype mismatch"):
157-
(ArrayDataset64(X32, y32, sample_weight32, seed=42),)
157+
ArrayDataset64(X32, y32, sample_weight32, seed=42)
158158

159159
with pytest.raises(ValueError, match="Buffer dtype mismatch"):
160-
(ArrayDataset32(X64, y64, sample_weight64, seed=42),)
160+
ArrayDataset32(X64, y64, sample_weight64, seed=42)
161161

162162
for csr_container in CSR_CONTAINERS:
163163
X_csr32 = csr_container(X32)
164164
X_csr64 = csr_container(X64)
165165
with pytest.raises(ValueError, match="Buffer dtype mismatch"):
166-
(
167-
CSRDataset64(
168-
X_csr32.data,
169-
X_csr32.indptr,
170-
X_csr32.indices,
171-
y32,
172-
sample_weight32,
173-
seed=42,
174-
),
166+
CSRDataset64(
167+
X_csr32.data,
168+
X_csr32.indptr,
169+
X_csr32.indices,
170+
y32,
171+
sample_weight32,
172+
seed=42,
175173
)
176174

177175
with pytest.raises(ValueError, match="Buffer dtype mismatch"):
178-
(
179-
CSRDataset32(
180-
X_csr64.data,
181-
X_csr64.indptr,
182-
X_csr64.indices,
183-
y64,
184-
sample_weight64,
185-
seed=42,
186-
),
176+
CSRDataset32(
177+
X_csr64.data,
178+
X_csr64.indptr,
179+
X_csr64.indices,
180+
y64,
181+
sample_weight64,
182+
seed=42,
187183
)

0 commit comments

Comments
 (0)