MCPcopy Create free account
hub / github.com/dask/dask / test_asanyarray

Function test_asanyarray

dask/array/tests/test_cupy_core.py:161–169  ·  view source on GitHub ↗
(arr, like)

Source from the content-addressed store, hash-verified

159 "like", [np.arange(5), cupy.arange(5), da.arange(5), da.from_array(cupy.arange(5))]
160)
161def test_asanyarray(arr, like):
162 if isinstance(like, np.ndarray) and isinstance(
163 da.utils.meta_from_array(arr), cupy.ndarray
164 ):
165 with pytest.raises(TypeError):
166 a = da.utils.asanyarray_safe(arr, like=like)
167 else:
168 a = da.utils.asanyarray_safe(arr, like=like)
169 assert type(a) is type(like)
170
171
172def test_vindex():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected