Skip to content

Commit 5700100

Browse files
committed
COSMIT pep8
1 parent 7cab9bd commit 5700100

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

sklearn/datasets/svmlight_format.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,8 @@ def dump_svmlight_file(X, y, f, zero_based=True, comment=None, query_id=None):
305305

306306
y = np.asarray(y)
307307
if y.ndim != 1:
308-
raise ValueError("expected y of shape (n_samples,), got %r" % (y.shape,))
308+
raise ValueError("expected y of shape (n_samples,), got %r"
309+
% (y.shape,))
309310

310311
X = atleast2d_or_csr(X)
311312
if X.shape[0] != y.shape[0]:
@@ -315,7 +316,8 @@ def dump_svmlight_file(X, y, f, zero_based=True, comment=None, query_id=None):
315316
if query_id is not None:
316317
query_id = np.asarray(query_id)
317318
if query_id.shape[0] != y.shape[0]:
318-
raise ValueError("expected query_id of shape (n_samples,), got %r" % (query_id.shape,))
319+
raise ValueError("expected query_id of shape (n_samples,), got %r"
320+
% (query_id.shape,))
319321

320322
one_based = not zero_based
321323

sklearn/linear_model/omp.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,8 @@ def orthogonal_mp_gram(Gram, Xy, n_nonzero_coefs=None, tol=None,
365365
"""
366366
Gram = array2d(Gram, order='F', copy=copy_Gram)
367367
Xy = np.asarray(Xy)
368-
if Xy.ndim > 1 and Xy.shape[1] > 1: # or subsequent target will be affected
368+
if Xy.ndim > 1 and Xy.shape[1] > 1:
369+
# or subsequent target will be affected
369370
copy_Gram = True
370371
if Xy.ndim == 1:
371372
Xy = Xy[:, np.newaxis]

0 commit comments

Comments
 (0)