@@ -239,8 +239,9 @@ def test_copy_scalar_with_func(func, shape, dtype):
239
239
X = dpt .usm_ndarray (shape , dtype = dtype )
240
240
except dpctl .SyclDeviceCreationError :
241
241
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 ()
244
245
assert func (X ) == func (Y )
245
246
246
247
@@ -254,8 +255,9 @@ def test_copy_scalar_with_method(method, shape, dtype):
254
255
X = dpt .usm_ndarray (shape , dtype = dtype )
255
256
except dpctl .SyclDeviceCreationError :
256
257
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 ()
259
261
assert getattr (X , method )() == getattr (Y , method )()
260
262
261
263
0 commit comments