Skip to content

Commit e33e84d

Browse files
SebastinSantyjnothman
authored andcommitted
[MRG] FIX Examples use int / int without __future__.division (scikit-learn#9426)
1 parent 5a74e2f commit e33e84d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

examples/applications/plot_tomography_l1_reconstruction.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def generate_synthetic_data():
101101
rs = np.random.RandomState(0)
102102
n_pts = 36
103103
x, y = np.ogrid[0:l, 0:l]
104-
mask_outer = (x - l / 2) ** 2 + (y - l / 2) ** 2 < (l / 2) ** 2
104+
mask_outer = (x - l / 2.) ** 2 + (y - l / 2.) ** 2 < (l / 2.) ** 2
105105
mask = np.zeros((l, l))
106106
points = l * rs.rand(2, n_pts)
107107
mask[(points[0]).astype(np.int), (points[1]).astype(np.int)] = 1

examples/linear_model/plot_sparse_logistic_regression_mnist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
X_test = scaler.transform(X_test)
5353

5454
# Turn up tolerance for faster convergence
55-
clf = LogisticRegression(C=50 / train_samples,
55+
clf = LogisticRegression(C=50. / train_samples,
5656
multi_class='multinomial',
5757
penalty='l1', solver='saga', tol=0.1)
5858
clf.fit(X_train, y_train)

0 commit comments

Comments
 (0)