@@ -31,8 +31,8 @@ def test_ransac_inliers_outliers():
31
31
ransac_estimator .fit (X , y )
32
32
33
33
# Ground truth / reference inlier mask
34
- ref_inlier_mask = np .ones_like (ransac_estimator .inlier_mask_ ,
35
- dtype = np .bool_ )
34
+ ref_inlier_mask = np .ones_like (ransac_estimator .inlier_mask_
35
+ ). astype ( np .bool_ )
36
36
ref_inlier_mask [outliers ] = False
37
37
38
38
assert_equal (ransac_estimator .inlier_mask_ , ref_inlier_mask )
@@ -144,8 +144,8 @@ def test_ransac_sparse_coo():
144
144
residual_threshold = 5 , random_state = 0 )
145
145
ransac_estimator .fit (X_sparse , y )
146
146
147
- ref_inlier_mask = np .ones_like (ransac_estimator .inlier_mask_ ,
148
- dtype = np .bool_ )
147
+ ref_inlier_mask = np .ones_like (ransac_estimator .inlier_mask_
148
+ ). astype ( np .bool_ )
149
149
ref_inlier_mask [outliers ] = False
150
150
151
151
assert_equal (ransac_estimator .inlier_mask_ , ref_inlier_mask )
@@ -159,8 +159,8 @@ def test_ransac_sparse_csr():
159
159
residual_threshold = 5 , random_state = 0 )
160
160
ransac_estimator .fit (X_sparse , y )
161
161
162
- ref_inlier_mask = np .ones_like (ransac_estimator .inlier_mask_ ,
163
- dtype = np .bool_ )
162
+ ref_inlier_mask = np .ones_like (ransac_estimator .inlier_mask_
163
+ ). astype ( np .bool_ )
164
164
ref_inlier_mask [outliers ] = False
165
165
166
166
assert_equal (ransac_estimator .inlier_mask_ , ref_inlier_mask )
@@ -174,8 +174,8 @@ def test_ransac_sparse_csc():
174
174
residual_threshold = 5 , random_state = 0 )
175
175
ransac_estimator .fit (X_sparse , y )
176
176
177
- ref_inlier_mask = np .ones_like (ransac_estimator .inlier_mask_ ,
178
- dtype = np .bool_ )
177
+ ref_inlier_mask = np .ones_like (ransac_estimator .inlier_mask_
178
+ ). astype ( np .bool_ )
179
179
ref_inlier_mask [outliers ] = False
180
180
181
181
assert_equal (ransac_estimator .inlier_mask_ , ref_inlier_mask )
@@ -240,8 +240,8 @@ def test_ransac_multi_dimensional_targets():
240
240
ransac_estimator .fit (X , yyy )
241
241
242
242
# Ground truth / reference inlier mask
243
- ref_inlier_mask = np .ones_like (ransac_estimator .inlier_mask_ ,
244
- dtype = np .bool_ )
243
+ ref_inlier_mask = np .ones_like (ransac_estimator .inlier_mask_
244
+ ). astype ( np .bool_ )
245
245
ref_inlier_mask [outliers ] = False
246
246
247
247
assert_equal (ransac_estimator .inlier_mask_ , ref_inlier_mask )
@@ -286,8 +286,8 @@ def test_ransac_default_residual_threshold():
286
286
ransac_estimator .fit (X , y )
287
287
288
288
# Ground truth / reference inlier mask
289
- ref_inlier_mask = np .ones_like (ransac_estimator .inlier_mask_ ,
290
- dtype = np .bool_ )
289
+ ref_inlier_mask = np .ones_like (ransac_estimator .inlier_mask_
290
+ ). astype ( np .bool_ )
291
291
ref_inlier_mask [outliers ] = False
292
292
293
293
assert_equal (ransac_estimator .inlier_mask_ , ref_inlier_mask )
0 commit comments