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

Function test_from_array_name

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

Source from the content-addressed store, hash-verified

4733
4734
4735def test_from_array_name():
4736 x = np.array([1, 2, 3, 4, 5])
4737 chunks = x.shape
4738 # Default is tokenize the array
4739 dx = da.from_array(x, chunks=chunks)
4740 hashed_name = dx.name
4741 assert da.from_array(x, chunks=chunks).name == hashed_name
4742 # Specify name directly
4743 assert da.from_array(x, chunks=chunks, name="x").name == "x"
4744 # False gives a random name
4745 dx2 = da.from_array(x, chunks=chunks, name=False)
4746 dx3 = da.from_array(x, chunks=chunks, name=False)
4747 assert dx2.name != hashed_name
4748 assert dx3.name != hashed_name
4749 assert dx2.name != dx3.name
4750
4751
4752def test_concatenate_errs():

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected