MCPcopy Index your code
hub / github.com/dask/dask / test_load_store_chunk

Function test_load_store_chunk

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

Source from the content-addressed store, hash-verified

6087
6088
6089def test_load_store_chunk():
6090 actual = np.array([0, 0, 0, 0, 0, 0])
6091 load_store_chunk(
6092 x=np.array([1, 2, 3]),
6093 out=actual,
6094 region=None,
6095 index=slice(2, 5),
6096 lock=False,
6097 return_stored=False,
6098 load_stored=False,
6099 )
6100 expected = np.array([0, 0, 1, 2, 3, 0])
6101 assert all(actual == expected)
6102 # index should not be used on empty array
6103 actual = load_store_chunk(
6104 x=np.array([]),
6105 region=None,
6106 out=np.array([]),
6107 index=2,
6108 lock=False,
6109 return_stored=True,
6110 load_stored=False,
6111 )
6112 expected = np.array([])
6113 assert all(actual == expected)
6114
6115
6116def test_scalar_setitem():

Callers

nothing calls this directly

Calls 2

load_store_chunkFunction · 0.90
allFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…