MCPcopy Index your code
hub / github.com/dask/dask / test_reshape_unknown_dimensions

Function test_reshape_unknown_dimensions

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

Source from the content-addressed store, hash-verified

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

Used in the wild real call sites across dependent graphs

searching dependent graphs…