@@ -220,7 +220,7 @@ def test_nowarn_if_metric_bool_data_bool():
220
220
# https://github.com/scikit-learn/scikit-learn/issues/18996
221
221
222
222
pairwise_metric = 'rogerstanimoto'
223
- X = np .random .randint (2 , size = (5 , 2 ), dtype = np . bool )
223
+ X = np .random .randint (2 , size = (5 , 2 ), dtype = bool )
224
224
225
225
with pytest .warns (None ) as warn_record :
226
226
OPTICS (metric = pairwise_metric ).fit (X )
@@ -234,7 +234,7 @@ def test_warn_if_metric_bool_data_no_bool():
234
234
# https://github.com/scikit-learn/scikit-learn/issues/18996
235
235
236
236
pairwise_metric = 'rogerstanimoto'
237
- X = np .random .randint (2 , size = (5 , 2 ), dtype = np .int )
237
+ X = np .random .randint (2 , size = (5 , 2 ), dtype = np .int32 )
238
238
msg = f"Data will be converted to boolean for metric { pairwise_metric } "
239
239
240
240
with pytest .warns (DataConversionWarning , match = msg ) as warn_record :
@@ -246,8 +246,8 @@ def test_nowarn_if_metric_no_bool():
246
246
# make sure no conversion warning is raised if
247
247
# metric isn't boolean, no matter what the data type is
248
248
pairwise_metric = 'minkowski'
249
- X_bool = np .random .randint (2 , size = (5 , 2 ), dtype = np . bool )
250
- X_num = np .random .randint (2 , size = (5 , 2 ), dtype = np .int )
249
+ X_bool = np .random .randint (2 , size = (5 , 2 ), dtype = bool )
250
+ X_num = np .random .randint (2 , size = (5 , 2 ), dtype = np .int32 )
251
251
252
252
with pytest .warns (None ) as warn_record :
253
253
# fit boolean data
0 commit comments