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

Function test_load_store_chunk

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

Source from the content-addressed store, hash-verified

6124
6125
6126def test_load_store_chunk():
6127 actual = np.array([0, 0, 0, 0, 0, 0])
6128 load_store_chunk(
6129 x=np.array([1, 2, 3]),
6130 out=actual,
6131 region=None,
6132 index=slice(2, 5),
6133 lock=False,
6134 return_stored=False,
6135 load_stored=False,
6136 )
6137 expected = np.array([0, 0, 1, 2, 3, 0])
6138 assert all(actual == expected)
6139 # index should not be used on empty array
6140 actual = load_store_chunk(
6141 x=np.array([]),
6142 region=None,
6143 out=np.array([]),
6144 index=2,
6145 lock=False,
6146 return_stored=True,
6147 load_stored=False,
6148 )
6149 expected = np.array([])
6150 assert all(actual == expected)
6151
6152
6153def test_scalar_setitem():

Callers

nothing calls this directly

Calls 2

load_store_chunkFunction · 0.90
allFunction · 0.85

Tested by

no test coverage detected