@@ -62,19 +62,22 @@ def test_to_device_host(library):
6262 assert_allclose (x , expected )
6363
6464
65- @pytest .mark .parametrize ("target_library,func " , is_functions .items ())
65+ @pytest .mark .parametrize ("target_library" , is_functions .keys ())
6666@pytest .mark .parametrize ("source_library" , is_functions .keys ())
67- def test_asarray (source_library , target_library , func , request ):
67+ def test_asarray (source_library , target_library , request ):
6868 if source_library == "dask.array" and target_library == "torch" :
6969 # Allow rest of test to execute instead of immediately xfailing
7070 # xref https://github.com/pandas-dev/pandas/issues/38902
7171
7272 # TODO: remove xfail once
7373 # https://github.com/dask/dask/issues/8260 is resolved
7474 request .node .add_marker (pytest .mark .xfail (reason = "Bug in dask raising error on conversion" ))
75+ if source_library == "cupy" and target_library != "cupy" :
76+ # cupy explicitly disallows implicit conversions to CPU
77+ pytest .skip (reason = "cupy does not support implicit conversion to CPU" )
7578 src_lib = import_ (source_library , wrapper = True )
7679 tgt_lib = import_ (target_library , wrapper = True )
77- is_tgt_type = globals ()[func ]
80+ is_tgt_type = globals ()[is_functions [ target_library ] ]
7881
7982 a = src_lib .asarray ([1 , 2 , 3 ])
8083 b = tgt_lib .asarray (a )
0 commit comments