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:1539–1546  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

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