@@ -63,6 +63,7 @@ def assert_sycl_queue_equal(result, expected):
6363 pytest .param ("fromstring" , ["1 2" ], {"dtype" : int , "sep" : " " }),
6464 pytest .param ("full" , [(2 , 2 )], {"fill_value" : 5 }),
6565 pytest .param ("eye" , [4 , 2 ], {}),
66+ pytest .param ("empty" , [(2 , 2 )], {}),
6667 pytest .param ("geomspace" , [1 , 4 , 8 ], {}),
6768 pytest .param ("identity" , [4 ], {}),
6869 pytest .param ("linspace" , [0 , 4 , 8 ], {}),
@@ -83,33 +84,12 @@ def test_array_creation(func, arg, kwargs, device):
8384 assert x .sycl_device == device
8485
8586
86- @pytest .mark .parametrize (
87- "device" , valid_dev , ids = [dev .filter_string for dev in valid_dev ]
88- )
89- def test_empty (device ):
90- x = dpnp .empty ((2 , 2 ), device = device )
91- assert x .sycl_device == device
92-
93-
94- @pytest .mark .parametrize (
95- "device_x" , valid_dev , ids = [dev .filter_string for dev in valid_dev ]
96- )
97- @pytest .mark .parametrize (
98- "device_y" , valid_dev , ids = [dev .filter_string for dev in valid_dev ]
99- )
100- def test_empty_like (device_x , device_y ):
101- x = dpnp .array ([1 , 2 , 3 ], device = device_x )
102- y = dpnp .empty_like (x )
103- assert_sycl_queue_equal (y .sycl_queue , x .sycl_queue )
104- y = dpnp .empty_like (x , device = device_y )
105- assert_sycl_queue_equal (y .sycl_queue , x .to_device (device_y ).sycl_queue )
106-
107-
10887@pytest .mark .parametrize (
10988 "func, args, kwargs" ,
11089 [
11190 pytest .param ("copy" , ["x0" ], {}),
11291 pytest .param ("diag" , ["x0" ], {}),
92+ pytest .param ("empty_like" , ["x0" ], {}),
11393 pytest .param ("full_like" , ["x0" ], {"fill_value" : 5 }),
11494 pytest .param ("geomspace" , ["x0[0:3]" , "8" , "4" ], {}),
11595 pytest .param ("geomspace" , ["1" , "x0[2:4]" , "4" ], {}),
@@ -136,10 +116,6 @@ def test_array_creation_follow_device(func, args, kwargs, device):
136116 assert_sycl_queue_equal (y .sycl_queue , x .sycl_queue )
137117
138118
139- @pytest .mark .skipif (
140- numpy .lib .NumpyVersion (numpy .__version__ ) < "1.25.0" ,
141- reason = "numpy.logspace supports a non-scalar base argument since 1.25.0" ,
142- )
143119@pytest .mark .parametrize (
144120 "device" , valid_dev , ids = [dev .filter_string for dev in valid_dev ]
145121)
@@ -171,6 +147,7 @@ def test_array_creation_follow_device_2d_array(func, args, kwargs, device):
171147 [
172148 pytest .param ("copy" , ["x0" ], {}),
173149 pytest .param ("diag" , ["x0" ], {}),
150+ pytest .param ("empty_like" , ["x0" ], {}),
174151 pytest .param ("full" , ["10" , "x0[3]" ], {}),
175152 pytest .param ("full_like" , ["x0" ], {"fill_value" : 5 }),
176153 pytest .param ("ones_like" , ["x0" ], {}),
@@ -199,7 +176,6 @@ def test_array_creation_cross_device(func, args, kwargs, device_x, device_y):
199176
200177 dpnp_kwargs ["device" ] = device_y
201178 y = getattr (dpnp , func )(* dpnp_args , ** dpnp_kwargs )
202-
203179 assert_sycl_queue_equal (y .sycl_queue , x .to_device (device_y ).sycl_queue )
204180
205181
@@ -231,7 +207,6 @@ def test_array_creation_cross_device_2d_array(
231207
232208 dpnp_kwargs ["device" ] = device_y
233209 y = getattr (dpnp , func )(* dpnp_args , ** dpnp_kwargs )
234-
235210 assert_sycl_queue_equal (y .sycl_queue , x .to_device (device_y ).sycl_queue )
236211
237212
0 commit comments