(x, shape)
| 376 | |
| 377 | |
| 378 | def _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 | |
| 389 | def reshape_blockwise( |
no test coverage detected