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

Function test_array_like

dask/array/tests/test_cupy_core.py:669–677  ·  view source on GitHub ↗
(xp, orig_arr, array_func)

Source from the content-addressed store, hash-verified

667@pytest.mark.parametrize("orig_arr", [np.array, da.array])
668@pytest.mark.parametrize("array_func", ["array", "asarray", "asanyarray"])
669def test_array_like(xp, orig_arr, array_func):
670 cp_func = getattr(cupy, array_func)
671 xp_func = getattr(xp, array_func)
672
673 cp_a = cp_func([1, 2, 3])
674 xp_a = xp_func(orig_arr([1, 2, 3]), like=da.from_array(cupy.array(())))
675 assert isinstance(xp_a, da.Array)
676 assert isinstance(xp_a._meta, cupy.ndarray)
677 assert_eq(xp_a, cp_a)

Callers

nothing calls this directly

Calls 1

assert_eqFunction · 0.90

Tested by

no test coverage detected