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

Function test_indices_dimensions_chunks

dask/array/tests/test_creation.py:345–356  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

343
344
345def test_indices_dimensions_chunks():
346 chunks = ((1, 4, 2, 3), (5, 5))
347 darr = da.indices((10, 10), chunks=chunks)
348 assert darr.chunks == ((1, 1),) + chunks
349
350 with dask.config.set({"array.chunk-size": "50 MiB"}):
351 shape = (10000, 10000)
352 expected = normalize_chunks("auto", shape=shape, dtype=int)
353 result = da.indices(shape, chunks="auto")
354 # indices prepends a dimension
355 actual = result.chunks[1:]
356 assert expected == actual
357
358
359def test_empty_indices():

Callers

nothing calls this directly

Calls 2

normalize_chunksFunction · 0.90
setMethod · 0.80

Tested by

no test coverage detected