44import numpy
55
66
7+ @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
78@pytest .mark .parametrize ("dtype" ,
89 [numpy .float64 , numpy .float32 , numpy .int64 , numpy .int32 ],
910 ids = ["float64" , "float32" , "int64" , "int32" ])
@@ -30,6 +31,7 @@ def test_asfarray2(dtype, data):
3031 numpy .testing .assert_array_equal (result , expected )
3132
3233
34+ @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
3335class TestConcatenate :
3436 def test_returns_copy (self ):
3537 a = dpnp .array (numpy .eye (3 ))
@@ -91,23 +93,27 @@ class TestHstack:
9193 def test_non_iterable (self ):
9294 numpy .testing .assert_raises (TypeError , dpnp .hstack , 1 )
9395
96+ @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
9497 def test_empty_input (self ):
9598 numpy .testing .assert_raises (ValueError , dpnp .hstack , ())
9699
100+ @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
97101 def test_0D_array (self ):
98102 b = dpnp .array (2 )
99103 a = dpnp .array (1 )
100104 res = dpnp .hstack ([a , b ])
101105 desired = dpnp .array ([1 , 2 ])
102106 numpy .testing .assert_array_equal (res , desired )
103107
108+ @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
104109 def test_1D_array (self ):
105110 a = dpnp .array ([1 ])
106111 b = dpnp .array ([2 ])
107112 res = dpnp .hstack ([a , b ])
108113 desired = dpnp .array ([1 , 2 ])
109114 numpy .testing .assert_array_equal (res , desired )
110115
116+ @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
111117 def test_2D_array (self ):
112118 a = dpnp .array ([[1 ], [2 ]])
113119 b = dpnp .array ([[1 ], [2 ]])
@@ -126,30 +132,35 @@ class TestVstack:
126132 def test_non_iterable (self ):
127133 numpy .testing .assert_raises (TypeError , dpnp .vstack , 1 )
128134
135+ @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
129136 def test_empty_input (self ):
130137 numpy .testing .assert_raises (ValueError , dpnp .vstack , ())
131138
139+ @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
132140 def test_0D_array (self ):
133141 a = dpnp .array (1 )
134142 b = dpnp .array (2 )
135143 res = dpnp .vstack ([a , b ])
136144 desired = dpnp .array ([[1 ], [2 ]])
137145 numpy .testing .assert_array_equal (res , desired )
138146
147+ @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
139148 def test_1D_array (self ):
140149 a = dpnp .array ([1 ])
141150 b = dpnp .array ([2 ])
142151 res = dpnp .vstack ([a , b ])
143152 desired = dpnp .array ([[1 ], [2 ]])
144153 numpy .testing .assert_array_equal (res , desired )
145154
155+ @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
146156 def test_2D_array (self ):
147157 a = dpnp .array ([[1 ], [2 ]])
148158 b = dpnp .array ([[1 ], [2 ]])
149159 res = dpnp .vstack ([a , b ])
150160 desired = dpnp .array ([[1 ], [2 ], [1 ], [2 ]])
151161 numpy .testing .assert_array_equal (res , desired )
152162
163+ @pytest .mark .usefixtures ("allow_fall_back_on_numpy" )
153164 def test_2D_array2 (self ):
154165 a = dpnp .array ([1 , 2 ])
155166 b = dpnp .array ([1 , 2 ])
0 commit comments