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

Function test_no_chunks_2d

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

Source from the content-addressed store, hash-verified

4132
4133
4134def test_no_chunks_2d():
4135 X = np.arange(24).reshape((4, 6))
4136 x = da.from_array(X, chunks=(2, 2))
4137 x._chunks = ((np.nan, np.nan), (np.nan, np.nan, np.nan))
4138
4139 with warnings.catch_warnings():
4140 warnings.simplefilter("ignore", RuntimeWarning) # divide by zero
4141 assert_eq(da.log(x), np.log(X))
4142 assert_eq(x.T, X.T)
4143 assert_eq(x.sum(axis=0, keepdims=True), X.sum(axis=0, keepdims=True))
4144 assert_eq(x.sum(axis=1, keepdims=True), X.sum(axis=1, keepdims=True))
4145 assert_eq(x.dot(x.T + 1), X.dot(X.T + 1))
4146
4147
4148def 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