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

Function _sanity_checks

dask/array/reshape.py:378–386  ·  view source on GitHub ↗
(x, shape)

Source from the content-addressed store, hash-verified

376
377
378def _sanity_checks(x, shape):
379 if np.isnan(sum(x.shape)):
380 raise ValueError(
381 f"Array chunk size or shape is unknown. shape: {x.shape}\n\n"
382 "Possible solution with x.compute_chunk_sizes()"
383 )
384
385 if reduce(mul, shape, 1) != x.size:
386 raise ValueError("total size of new array must be unchanged")
387
388
389def reshape_blockwise(

Callers 2

reshapeFunction · 0.85
reshape_blockwiseFunction · 0.85

Calls 1

sumFunction · 0.70

Tested by

no test coverage detected