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

Function test_reshape

dask/array/tests/test_array_core.py:1503–1513  ·  view source on GitHub ↗
(original_shape, new_shape, chunks)

Source from the content-addressed store, hash-verified

1501 ],
1502)
1503def test_reshape(original_shape, new_shape, chunks):
1504 x = np.random.default_rng().integers(10, size=original_shape)
1505 a = from_array(x, chunks=chunks)
1506
1507 xr = x.reshape(new_shape)
1508 ar = a.reshape(new_shape)
1509
1510 if a.shape == new_shape:
1511 assert a is ar
1512
1513 assert_eq(xr, ar)
1514
1515
1516def test_reshape_exceptions():

Callers

nothing calls this directly

Calls 4

from_arrayFunction · 0.90
assert_eqFunction · 0.90
reshapeMethod · 0.80
integersMethod · 0.45

Tested by

no test coverage detected