File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change @@ -460,3 +460,44 @@ def test_estimators_do_not_raise_errors_in_init_or_set_params(Estimator):
460
460
461
461
# Also do does not raise
462
462
est .set_params (** new_params )
463
+
464
+
465
+ # TODO: remove this filter in 1.2
466
+ @pytest .mark .filterwarnings ("ignore::FutureWarning:sklearn" )
467
+ @pytest .mark .parametrize (
468
+ "Estimator" ,
469
+ [
470
+ AffinityPropagation ,
471
+ Birch ,
472
+ MeanShift ,
473
+ KNeighborsClassifier ,
474
+ KNeighborsRegressor ,
475
+ RadiusNeighborsClassifier ,
476
+ RadiusNeighborsRegressor ,
477
+ LabelPropagation ,
478
+ LabelSpreading ,
479
+ OPTICS ,
480
+ SpectralClustering ,
481
+ LocalOutlierFactor ,
482
+ LocallyLinearEmbedding ,
483
+ Isomap ,
484
+ TSNE ,
485
+ ],
486
+ )
487
+ def test_f_contiguous_array_estimator (Estimator ):
488
+ # Non-regression test for:
489
+ # https://github.com/scikit-learn/scikit-learn/issues/23988
490
+ # https://github.com/scikit-learn/scikit-learn/issues/24013
491
+
492
+ X , _ = make_blobs (n_samples = 80 , n_features = 4 , random_state = 0 )
493
+ X = np .asfortranarray (X )
494
+ y = np .round (X [:, 0 ])
495
+
496
+ est = Estimator ()
497
+ est .fit (X , y )
498
+
499
+ if hasattr (est , "transform" ):
500
+ est .transform (X )
501
+
502
+ if hasattr (est , "predict" ):
503
+ est .predict (X )
You can’t perform that action at this time.
0 commit comments