@@ -239,8 +239,9 @@ def test_copy_scalar_with_func(func, shape, dtype):
239239 X = dpt .usm_ndarray (shape , dtype = dtype )
240240 except dpctl .SyclDeviceCreationError :
241241 pytest .skip ("No SYCL devices available" )
242- Y = np .arange (1 , X .size + 1 , dtype = dtype ).reshape (shape )
243- X .usm_data .copy_from_host (Y .reshape (- 1 ).view ("|u1" ))
242+ Y = np .arange (1 , X .size + 1 , dtype = dtype )
243+ X .usm_data .copy_from_host (Y .view ("|u1" ))
244+ Y .shape = tuple ()
244245 assert func (X ) == func (Y )
245246
246247
@@ -254,8 +255,9 @@ def test_copy_scalar_with_method(method, shape, dtype):
254255 X = dpt .usm_ndarray (shape , dtype = dtype )
255256 except dpctl .SyclDeviceCreationError :
256257 pytest .skip ("No SYCL devices available" )
257- Y = np .arange (1 , X .size + 1 , dtype = dtype ).reshape (shape )
258- X .usm_data .copy_from_host (Y .reshape (- 1 ).view ("|u1" ))
258+ Y = np .arange (1 , X .size + 1 , dtype = dtype )
259+ X .usm_data .copy_from_host (Y .view ("|u1" ))
260+ Y .shape = tuple ()
259261 assert getattr (X , method )() == getattr (Y , method )()
260262
261263
0 commit comments