MCPcopy Index your code
hub / github.com/dask/dask / test_no_chunks_2d

Function test_no_chunks_2d

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

Source from the content-addressed store, hash-verified

4139
4140
4141def test_no_chunks_2d():
4142 X = np.arange(24).reshape((4, 6))
4143 x = da.from_array(X, chunks=(2, 2))
4144 x._chunks = ((np.nan, np.nan), (np.nan, np.nan, np.nan))
4145
4146 with warnings.catch_warnings():
4147 warnings.simplefilter("ignore", RuntimeWarning) # divide by zero
4148 assert_eq(da.log(x), np.log(X))
4149 assert_eq(x.T, X.T)
4150 assert_eq(x.sum(axis=0, keepdims=True), X.sum(axis=0, keepdims=True))
4151 assert_eq(x.sum(axis=1, keepdims=True), X.sum(axis=1, keepdims=True))
4152 assert_eq(x.dot(x.T + 1), X.dot(X.T + 1))
4153
4154
4155def test_no_chunks_yes_chunks():

Callers

nothing calls this directly

Calls 5

assert_eqFunction · 0.90
reshapeMethod · 0.80
arangeMethod · 0.45
sumMethod · 0.45
dotMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…