88
99
1010def test__mask_out_of_bounds ():
11- known = numpy .array ([numpy .nan , numpy .nan , 0.1 , 0.5 , 0.9 , numpy .nan , numpy .nan ])
11+ known = numpy .array ([
12+ numpy .nan , numpy .nan , 0.1 , 0.5 ,
13+ 0.9 , numpy .nan , numpy .nan
14+ ])
1215 x = [- 0.1 , 0 , 0.1 , 0.5 , 0.9 , 1.0 , 1.1 ]
1316 result = transforms ._mask_out_of_bounds (x )
1417 nptest .assert_array_equal (known , result )
@@ -22,7 +25,6 @@ def test__clip_out_of_bounds():
2225 assert numpy .all (diff < 0.0001 )
2326
2427
25-
2628@pytest .fixture
2729def prob_trans ():
2830 cls = transforms .ProbTransform
@@ -80,13 +82,19 @@ def test_transform_inverted(trans, inver_cls):
8082 assert trans .out_of_bounds == t_inv .out_of_bounds
8183
8284
83- @pytest .mark .parametrize ('cls' , [transforms .ProbTransform , transforms .QuantileTransform ])
85+ @pytest .mark .parametrize ('cls' , [
86+ transforms .ProbTransform ,
87+ transforms .QuantileTransform
88+ ])
8489def test_bad_out_of_bounds (cls ):
8590 with pytest .raises (ValueError ):
8691 cls (_minimal_norm , out_of_bounds = 'junk' )
8792
8893
89- @pytest .mark .parametrize ('cls' , [transforms .ProbTransform , transforms .QuantileTransform ])
94+ @pytest .mark .parametrize ('cls' , [
95+ transforms .ProbTransform ,
96+ transforms .QuantileTransform
97+ ])
9098@pytest .mark .parametrize (('method' , 'func' ), [
9199 ('clip' , transforms ._clip_out_of_bounds ),
92100 ('mask' , transforms ._mask_out_of_bounds ),
0 commit comments