2222
2323
2424@pytest .mark .parametrize ("dtype" , ["f2" , "f4" , "f8" ])
25- def test_signbit_out_type_contig (dtype ):
25+ def test_signbit_out_type (dtype ):
2626 q = get_queue_or_skip ()
2727 skip_if_dtype_not_supported (dtype , q )
2828
@@ -39,24 +39,7 @@ def test_signbit_out_type_contig(dtype):
3939
4040
4141@pytest .mark .parametrize ("dtype" , ["f2" , "f4" , "f8" ])
42- def test_signbit_out_type_strided (dtype ):
43- q = get_queue_or_skip ()
44- skip_if_dtype_not_supported (dtype , q )
45-
46- arg_dt = np .dtype (dtype )
47- x = dpt .linspace (1 , 10 , num = 256 , dtype = arg_dt )
48- sb = dpt .signbit (x [::- 3 ])
49- assert sb .dtype == dpt .bool
50-
51- assert not dpt .any (sb )
52-
53- x2 = dpt .linspace (- 10 , - 1 , num = 256 , dtype = arg_dt )
54- sb2 = dpt .signbit (x2 [::- 3 ])
55- assert dpt .all (sb2 )
56-
57-
58- @pytest .mark .parametrize ("dtype" , ["f2" , "f4" , "f8" ])
59- def test_signbit_special_cases_contig (dtype ):
42+ def test_signbit_special_cases (dtype ):
6043 q = get_queue_or_skip ()
6144 skip_if_dtype_not_supported (dtype , q )
6245
@@ -80,29 +63,3 @@ def test_signbit_special_cases_contig(dtype):
8063 )
8164
8265 assert dpt .all (dpt .equal (actual , expected ))
83-
84-
85- @pytest .mark .parametrize ("dtype" , ["f2" , "f4" , "f8" ])
86- def test_signbit_special_cases_strided (dtype ):
87- q = get_queue_or_skip ()
88- skip_if_dtype_not_supported (dtype , q )
89-
90- arg_dt = np .dtype (dtype )
91- x1 = dpt .full (63 , - dpt .inf , dtype = arg_dt )
92- x2 = dpt .full (63 , - 0.0 , dtype = arg_dt )
93- x3 = dpt .full (63 , 0.0 , dtype = arg_dt )
94- x4 = dpt .full (63 , dpt .inf , dtype = arg_dt )
95-
96- x = dpt .concat ((x1 , x2 , x3 , x4 ))
97- actual = dpt .signbit (x [::- 1 ])
98-
99- expected = dpt .concat (
100- (
101- dpt .full (x4 .size , False ),
102- dpt .full (x3 .size , False ),
103- dpt .full (x2 .size , True ),
104- dpt .full (x1 .size , True ),
105- )
106- )
107-
108- assert dpt .all (dpt .equal (actual , expected ))
0 commit comments