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

Function test_reshape_unknown_dimensions

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

Source from the content-addressed store, hash-verified

1535
1536
1537def test_reshape_unknown_dimensions():
1538 for original_shape in [(24,), (2, 12), (2, 3, 4)]:
1539 for new_shape in [(-1,), (2, -1), (-1, 3, 4)]:
1540 x = np.random.default_rng().integers(10, size=original_shape)
1541 a = from_array(x, 24)
1542 assert_eq(x.reshape(new_shape), a.reshape(new_shape))
1543
1544 pytest.raises(ValueError, lambda: da.reshape(a, (-1, -1)))
1545
1546
1547def test_full():

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