Skip to content

Commit 7795201

Browse files
committed
Fix lint-python errors
1 parent 21d4fe3 commit 7795201

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

python/pyspark/mllib/regression.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def _regression_train_wrapper(train_func, modelClass, data, initial_weights):
135135
first = data.first()
136136
if not isinstance(first, LabeledPoint):
137137
raise ValueError("data should be an RDD of LabeledPoint, but got %s" % first)
138-
if initial_weights == None:
138+
if initial_weights is None:
139139
initial_weights = [0.0] * len(data.first().features)
140140
weights, intercept = train_func(data, _convert_to_vector(initial_weights))
141141
return modelClass(weights, intercept)

python/pyspark/mllib/tests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,7 @@ def test_regression(self):
330330
except ValueError:
331331
self.fail()
332332

333+
333334
class StatTests(PySparkTestCase):
334335
# SPARK-4023
335336
def test_col_with_different_rdds(self):

0 commit comments

Comments
 (0)