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

Function test_setitem_2d

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

Source from the content-addressed store, hash-verified

4299
4300
4301def test_setitem_2d():
4302 x = np.arange(24).reshape((4, 6))
4303 dx = da.from_array(x.copy(), chunks=(2, 2))
4304
4305 x[x > 6] = -1
4306 x[x % 2 == 0] = -2
4307
4308 dx[dx > 6] = -1
4309 dx[dx % 2 == 0] = -2
4310
4311 assert_eq(x, dx)
4312
4313
4314def test_setitem_extended_API_0d():

Callers

nothing calls this directly

Calls 4

assert_eqFunction · 0.90
reshapeMethod · 0.80
arangeMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected