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

Function test_empty_indices

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

Source from the content-addressed store, hash-verified

357
358
359def test_empty_indices():
360 darr = da.indices(tuple(), chunks=tuple())
361 nparr = np.indices(tuple())
362 assert darr.shape == nparr.shape
363 assert darr.dtype == nparr.dtype
364 assert_eq(darr, nparr)
365
366 darr = da.indices(tuple(), float, chunks=tuple())
367 nparr = np.indices(tuple(), float)
368 assert darr.shape == nparr.shape
369 assert darr.dtype == nparr.dtype
370 assert_eq(darr, nparr)
371
372 darr = da.indices((0,), float, chunks=(1,))
373 nparr = np.indices((0,), float)
374 assert darr.shape == nparr.shape
375 assert darr.dtype == nparr.dtype
376 assert_eq(darr, nparr)
377
378 darr = da.indices((0, 1, 2), float, chunks=(1, 1, 2))
379 nparr = np.indices((0, 1, 2), float)
380 assert darr.shape == nparr.shape
381 assert darr.dtype == nparr.dtype
382 assert_eq(darr, nparr)
383
384
385def test_indices():

Callers

nothing calls this directly

Calls 1

assert_eqFunction · 0.90

Tested by

no test coverage detected