MCPcopy
hub / github.com/dask/dask / test_from_array_inline

Function test_from_array_inline

dask/array/tests/test_array_core.py:3031–3041  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3029
3030
3031def test_from_array_inline():
3032 class MyArray(np.ndarray):
3033 pass
3034
3035 a = np.array([1, 2, 3]).view(MyArray)
3036 dsk = dict(da.from_array(a, name="my-array", inline_array=False).dask)
3037 assert dsk["original-my-array"] is not a
3038 assert_eq(dsk["original-my-array"], a)
3039
3040 dsk = dict(da.from_array(a, name="my-array", inline_array=True).dask)
3041 assert "original-my-array" not in dsk
3042
3043
3044@pytest.mark.parametrize("asarray", [da.asarray, da.asanyarray])

Callers

nothing calls this directly

Calls 2

assert_eqFunction · 0.90
viewMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…