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:5902–5926  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5900
5901
5902def test_load_store_chunk():
5903 actual = np.array([0, 0, 0, 0, 0, 0])
5904 load_store_chunk(
5905 x=np.array([1, 2, 3]),
5906 out=actual,
5907 region=None,
5908 index=slice(2, 5),
5909 lock=False,
5910 return_stored=False,
5911 load_stored=False,
5912 )
5913 expected = np.array([0, 0, 1, 2, 3, 0])
5914 assert all(actual == expected)
5915 # index should not be used on empty array
5916 actual = load_store_chunk(
5917 x=np.array([]),
5918 region=None,
5919 out=np.array([]),
5920 index=2,
5921 lock=False,
5922 return_stored=True,
5923 load_stored=False,
5924 )
5925 expected = np.array([])
5926 assert all(actual == expected)
5927
5928
5929def test_scalar_setitem():

Callers

nothing calls this directly

Calls 2

load_store_chunkFunction · 0.90
allFunction · 0.85

Tested by

no test coverage detected