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

Function test_0d_array

dask/array/tests/test_reductions.py:536–544  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

534
535
536def test_0d_array():
537 x = da.mean(da.ones(4, chunks=4), axis=()).compute()
538 x = da.mean(da.ones(4, chunks=4), axis=0).compute()
539 y = np.mean(np.ones(4))
540 assert type(x) == type(y)
541
542 x = da.sum(da.zeros(4, chunks=1)).compute()
543 y = np.sum(np.zeros(4))
544 assert type(x) == type(y)
545
546
547def test_reduction_on_scalar():

Callers

nothing calls this directly

Calls 5

computeMethod · 0.45
meanMethod · 0.45
onesMethod · 0.45
sumMethod · 0.45
zerosMethod · 0.45

Tested by

no test coverage detected