File tree Expand file tree Collapse file tree 1 file changed +0
-17
lines changed
Expand file tree Collapse file tree 1 file changed +0
-17
lines changed Original file line number Diff line number Diff line change @@ -580,23 +580,6 @@ def test_sample_weight_invalid():
580580 clf = DummyClassifier ().fit (X , y , sample_weight )
581581 assert_array_almost_equal (clf .class_prior_ , [0.2 / 1.2 , 1. / 1.2 ])
582582
583- sample_weight = np .random .rand (3 , 1 )
584- with pytest .raises (ValueError ):
585- clf .fit (X , y , sample_weight = sample_weight )
586-
587- sample_weight = np .array (0 )
588- expected_err = r"Singleton.* cannot be considered a valid collection"
589- with pytest .raises (TypeError , match = expected_err ):
590- clf .fit (X , y , sample_weight = sample_weight )
591-
592- sample_weight = np .ones (4 )
593- with pytest .raises (ValueError ):
594- clf .fit (X , y , sample_weight = sample_weight )
595-
596- sample_weight = np .ones (2 )
597- with pytest .raises (ValueError ):
598- clf .fit (X , y , sample_weight = sample_weight )
599-
600583
601584def test_constant_strategy_sparse_target ():
602585 X = [[0 ]] * 5 # ignored
You can’t perform that action at this time.
0 commit comments