mrocklin: OK with the assert_eq change?
pitrou: Yes, of course.
diff --git a/dask/array/rechunk.py b/dask/array/rechunk.py
index de5da0f68..eea5470ff 100644
--- a/dask/array/rechunk.py
+++ b/dask/array/rechunk.py
@@ -18,6 +18,7 @@ from toolz import accumulate, reduce
 
 from ..base import tokenize
 from .core import concatenate3, Array, normalize_chunks
+from .wrap import empty
 from .. import sharedict
 
 
@@ -484,6 +485,10 @@ def plan_rechunk(old_chunks, new_chunks, itemsize,
 def _compute_rechunk(x, chunks):
     """ Compute the rechunk of *x* to the given *chunks*.
     """
+    if x.size == 0:
+        # Special case for empty array, as the algorithm below does not behave correctly
+        return empty(x.shape, chunks=chunks, dtype=x.dtype)
+
     ndim = x.ndim
     crossed = intersect_chunks(x.chunks, chunks)
     x2 = dict()

Reshape with empty dimensions
Reshaping with zero dimensions fails

```python
def test_reshape_empty():
    x = da.ones((0, 10), chunks=(5, 5))
    y = x.reshape((0, 5, 2))
    assert_eq(x, x) 
```

I've tracked this down to the fact that this line returns a list with one empty list

```python
def intersect_chunks(...):
    ...
    old_to_new = [_intersect_1d(_breakpoints(old, new))
                  for old, new in zip(cmo, cmn)]
```

So the subsequent call to `itertools.product` returns an empty result.

I tried diving into `_intersect_1d` but had difficulty understanding the intent or the expected output.

@pitrou if you feel like looking this I would appreciate it.  Totally OK if not.  Otherwise I will resolve it later today.
diff --git a/dask/array/tests/test_array_core.py b/dask/array/tests/test_array_core.py
index 86686843b..a68e45d72 100644
--- a/dask/array/tests/test_array_core.py
+++ b/dask/array/tests/test_array_core.py
@@ -788,6 +788,10 @@ def test_roll(chunks, shift, axis):
     ((4, 64), (4, 8, 4, 2), (2, 16)),
     ((4, 8, 4, 2), (2, 1, 2, 32, 2), (2, 4, 2, 2)),
     ((4, 1, 4), (4, 4), (2, 1, 2)),
+    ((0, 10), (0, 5, 2), (5, 5)),
+    ((5, 0, 2), (0, 10), (5, 2, 2)),
+    ((0,), (2, 0, 2), (4,)),
+    ((2, 0, 2), (0,), (4, 4, 4)),
 ])
 def test_reshape(original_shape, new_shape, chunks):
     x = np.random.randint(10, size=original_shape)
diff --git a/dask/array/tests/test_rechunk.py b/dask/array/tests/test_rechunk.py
index 01fdcee7a..967f6ce9c 100644
--- a/dask/array/tests/test_rechunk.py
+++ b/dask/array/tests/test_rechunk.py
@@ -6,6 +6,7 @@ np = pytest.importorskip('numpy')
 
 import dask
 from dask.utils import funcname
+from dask.array.utils import assert_eq
 from dask.array.rechunk import intersect_chunks, rechunk, normalize_chunks
 from dask.array.rechunk import cumdims_label, _breakpoints, _intersect_1d
 from dask.array.rechunk import plan_rechunk, divide_to_width, merge_to_number
@@ -184,6 +185,13 @@ def test_rechunk_0d():
     assert y.compute() == a
 
 
+def test_rechunk_empty():
+    x = da.ones((0, 10), chunks=(5, 5))
+    y = x.rechunk((2, 2))
+    assert y.chunks == ((0,), (2,) * 5)
+    assert_eq(x, y)
+
+
 def test_rechunk_same():
     x = da.ones((24, 24), chunks=(4, 8))
     y = x.rechunk(x.chunks)

pip install -e .[complete]
parse_log_pytest
requirements.txt
pytest moto mock
3.6
docs/requirements-docs.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
aiobotocore==2.1.2
aiohttp==3.8.6
aioitertools==0.11.0
aiosignal==1.2.0
alabaster==0.7.13
async-timeout==4.0.2
asynctest==0.13.0
attrs==22.2.0
Babel==2.11.0
boto3==1.23.10
botocore==1.23.24
certifi==2021.5.30
cffi==1.15.1
charset-normalizer==2.0.12
click==8.0.4
cloudpickle==2.2.1
cryptography==40.0.2
-e git+https://github.com/dask/dask.git@0d741d79e02281c3c145636c2cad972fb247de7d#egg=dask
dataclasses==0.8
distributed==1.19.3
docutils==0.18.1
frozenlist==1.2.0
fsspec==2022.1.0
HeapDict==1.0.1
idna==3.10
idna-ssl==1.1.0
imagesize==1.4.1
importlib-metadata==4.8.3
iniconfig==1.1.1
Jinja2==3.0.3
jmespath==0.10.0
locket==1.0.0
MarkupSafe==2.0.1
mock==5.2.0
moto==4.0.13
msgpack-python==0.5.6
multidict==5.2.0
numpy==1.19.5
numpydoc==1.1.0
packaging==21.3
pandas==1.1.5
partd==1.2.0
pluggy==1.0.0
psutil==7.0.0
py==1.11.0
pycparser==2.21
Pygments==2.14.0
pyparsing==3.1.4
pytest==7.0.1
python-dateutil==2.9.0.post0
pytz==2025.2
requests==2.27.1
responses==0.17.0
s3fs==2022.1.0
s3transfer==0.5.2
six==1.17.0
snowballstemmer==2.2.0
sortedcontainers==2.4.0
Sphinx==5.3.0
sphinx-rtd-theme==2.0.0
sphinxcontrib-applehelp==1.0.2
sphinxcontrib-devhelp==1.0.2
sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
tblib==1.7.0
tomli==1.2.3
toolz==0.12.0
tornado==6.1
typing_extensions==4.1.1
urllib3==1.26.20
Werkzeug==2.0.3
wrapt==1.16.0
xmltodict==0.14.2
yarl==1.7.2
zict==2.1.0
zipp==3.6.0

name: dask
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - aiobotocore==2.1.2
      - aiohttp==3.8.6
      - aioitertools==0.11.0
      - aiosignal==1.2.0
      - alabaster==0.7.13
      - async-timeout==4.0.2
      - asynctest==0.13.0
      - attrs==22.2.0
      - babel==2.11.0
      - boto3==1.23.10
      - botocore==1.23.24
      - cffi==1.15.1
      - charset-normalizer==2.0.12
      - click==8.0.4
      - cloudpickle==2.2.1
      - cryptography==40.0.2
      - dataclasses==0.8
      - distributed==1.19.3
      - docutils==0.18.1
      - frozenlist==1.2.0
      - fsspec==2022.1.0
      - heapdict==1.0.1
      - idna==3.10
      - idna-ssl==1.1.0
      - imagesize==1.4.1
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - jinja2==3.0.3
      - jmespath==0.10.0
      - locket==1.0.0
      - markupsafe==2.0.1
      - mock==5.2.0
      - moto==4.0.13
      - msgpack-python==0.5.6
      - multidict==5.2.0
      - numpy==1.19.5
      - numpydoc==1.1.0
      - packaging==21.3
      - pandas==1.1.5
      - partd==1.2.0
      - pluggy==1.0.0
      - psutil==7.0.0
      - py==1.11.0
      - pycparser==2.21
      - pygments==2.14.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - python-dateutil==2.9.0.post0
      - pytz==2025.2
      - requests==2.27.1
      - responses==0.17.0
      - s3fs==2022.1.0
      - s3transfer==0.5.2
      - six==1.17.0
      - snowballstemmer==2.2.0
      - sortedcontainers==2.4.0
      - sphinx==5.3.0
      - sphinx-rtd-theme==2.0.0
      - sphinxcontrib-applehelp==1.0.2
      - sphinxcontrib-devhelp==1.0.2
      - sphinxcontrib-htmlhelp==2.0.0
      - sphinxcontrib-jquery==4.1
      - sphinxcontrib-jsmath==1.0.1
      - sphinxcontrib-qthelp==1.0.3
      - sphinxcontrib-serializinghtml==1.1.5
      - tblib==1.7.0
      - tomli==1.2.3
      - toolz==0.12.0
      - tornado==6.1
      - typing-extensions==4.1.1
      - urllib3==1.26.20
      - werkzeug==2.0.3
      - wrapt==1.16.0
      - xmltodict==0.14.2
      - yarl==1.7.2
      - zict==2.1.0
      - zipp==3.6.0
prefix: /opt/conda/envs/dask

dask/array/tests/test_array_core.py::test_reshape[original_shape31-new_shape31-chunks31] dask/array/tests/test_rechunk.py::test_rechunk_empty
dask/array/tests/test_array_core.py::test_field_access dask/array/tests/test_array_core.py::test_field_access_with_shape dask/array/tests/test_array_core.py::test_setitem_mixed_d
dask/array/tests/test_array_core.py::test_getem dask/array/tests/test_array_core.py::test_top dask/array/tests/test_array_core.py::test_top_supports_broadcasting_rules dask/array/tests/test_array_core.py::test_concatenate3_on_scalars dask/array/tests/test_array_core.py::test_chunked_dot_product dask/array/tests/test_array_core.py::test_chunked_transpose_plus_one dask/array/tests/test_array_core.py::test_transpose dask/array/tests/test_array_core.py::test_broadcast_dimensions_works_with_singleton_dimensions dask/array/tests/test_array_core.py::test_broadcast_dimensions dask/array/tests/test_array_core.py::test_Array dask/array/tests/test_array_core.py::test_uneven_chunks dask/array/tests/test_array_core.py::test_numblocks_suppoorts_singleton_block_dims dask/array/tests/test_array_core.py::test_keys dask/array/tests/test_array_core.py::test_Array_computation dask/array/tests/test_array_core.py::test_stack dask/array/tests/test_array_core.py::test_short_stack dask/array/tests/test_array_core.py::test_stack_scalars dask/array/tests/test_array_core.py::test_stack_rechunk dask/array/tests/test_array_core.py::test_concatenate dask/array/tests/test_array_core.py::test_concatenate_rechunk dask/array/tests/test_array_core.py::test_concatenate_fixlen_strings dask/array/tests/test_array_core.py::test_vstack dask/array/tests/test_array_core.py::test_hstack dask/array/tests/test_array_core.py::test_dstack dask/array/tests/test_array_core.py::test_take dask/array/tests/test_array_core.py::test_compress dask/array/tests/test_array_core.py::test_binops dask/array/tests/test_array_core.py::test_isnull dask/array/tests/test_array_core.py::test_isclose dask/array/tests/test_array_core.py::test_broadcast_shapes dask/array/tests/test_array_core.py::test_elemwise_on_scalars dask/array/tests/test_array_core.py::test_partial_by_order dask/array/tests/test_array_core.py::test_elemwise_with_ndarrays dask/array/tests/test_array_core.py::test_elemwise_differently_chunked dask/array/tests/test_array_core.py::test_operators dask/array/tests/test_array_core.py::test_operator_dtype_promotion dask/array/tests/test_array_core.py::test_tensordot dask/array/tests/test_array_core.py::test_tensordot_2[0] dask/array/tests/test_array_core.py::test_tensordot_2[1] dask/array/tests/test_array_core.py::test_tensordot_2[axes2] dask/array/tests/test_array_core.py::test_tensordot_2[axes3] dask/array/tests/test_array_core.py::test_tensordot_2[axes4] dask/array/tests/test_array_core.py::test_tensordot_2[axes5] dask/array/tests/test_array_core.py::test_tensordot_2[axes6] dask/array/tests/test_array_core.py::test_dot_method dask/array/tests/test_array_core.py::test_T dask/array/tests/test_array_core.py::test_norm dask/array/tests/test_array_core.py::test_choose dask/array/tests/test_array_core.py::test_where dask/array/tests/test_array_core.py::test_where_has_informative_error dask/array/tests/test_array_core.py::test_coarsen dask/array/tests/test_array_core.py::test_coarsen_with_excess dask/array/tests/test_array_core.py::test_insert dask/array/tests/test_array_core.py::test_multi_insert dask/array/tests/test_array_core.py::test_broadcast_to dask/array/tests/test_array_core.py::test_ravel dask/array/tests/test_array_core.py::test_roll[None-3-chunks0] dask/array/tests/test_array_core.py::test_roll[None-3-chunks1] dask/array/tests/test_array_core.py::test_roll[None-7-chunks0] dask/array/tests/test_array_core.py::test_roll[None-7-chunks1] dask/array/tests/test_array_core.py::test_roll[None-9-chunks0] dask/array/tests/test_array_core.py::test_roll[None-9-chunks1] dask/array/tests/test_array_core.py::test_roll[None-shift3-chunks0] dask/array/tests/test_array_core.py::test_roll[None-shift3-chunks1] dask/array/tests/test_array_core.py::test_roll[None-shift4-chunks0] dask/array/tests/test_array_core.py::test_roll[None-shift4-chunks1] dask/array/tests/test_array_core.py::test_roll[0-3-chunks0] dask/array/tests/test_array_core.py::test_roll[0-3-chunks1] dask/array/tests/test_array_core.py::test_roll[0-7-chunks0] dask/array/tests/test_array_core.py::test_roll[0-7-chunks1] dask/array/tests/test_array_core.py::test_roll[0-9-chunks0] dask/array/tests/test_array_core.py::test_roll[0-9-chunks1] dask/array/tests/test_array_core.py::test_roll[0-shift3-chunks0] dask/array/tests/test_array_core.py::test_roll[0-shift3-chunks1] dask/array/tests/test_array_core.py::test_roll[0-shift4-chunks0] dask/array/tests/test_array_core.py::test_roll[0-shift4-chunks1] dask/array/tests/test_array_core.py::test_roll[1-3-chunks0] dask/array/tests/test_array_core.py::test_roll[1-3-chunks1] dask/array/tests/test_array_core.py::test_roll[1-7-chunks0] dask/array/tests/test_array_core.py::test_roll[1-7-chunks1] dask/array/tests/test_array_core.py::test_roll[1-9-chunks0] dask/array/tests/test_array_core.py::test_roll[1-9-chunks1] dask/array/tests/test_array_core.py::test_roll[1-shift3-chunks0] dask/array/tests/test_array_core.py::test_roll[1-shift3-chunks1] dask/array/tests/test_array_core.py::test_roll[1-shift4-chunks0] dask/array/tests/test_array_core.py::test_roll[1-shift4-chunks1] dask/array/tests/test_array_core.py::test_roll[-1-3-chunks0] dask/array/tests/test_array_core.py::test_roll[-1-3-chunks1] dask/array/tests/test_array_core.py::test_roll[-1-7-chunks0] dask/array/tests/test_array_core.py::test_roll[-1-7-chunks1] dask/array/tests/test_array_core.py::test_roll[-1-9-chunks0] dask/array/tests/test_array_core.py::test_roll[-1-9-chunks1] dask/array/tests/test_array_core.py::test_roll[-1-shift3-chunks0] dask/array/tests/test_array_core.py::test_roll[-1-shift3-chunks1] dask/array/tests/test_array_core.py::test_roll[-1-shift4-chunks0] dask/array/tests/test_array_core.py::test_roll[-1-shift4-chunks1] dask/array/tests/test_array_core.py::test_roll[axis4-3-chunks0] dask/array/tests/test_array_core.py::test_roll[axis4-3-chunks1] dask/array/tests/test_array_core.py::test_roll[axis4-7-chunks0] dask/array/tests/test_array_core.py::test_roll[axis4-7-chunks1] dask/array/tests/test_array_core.py::test_roll[axis4-9-chunks0] dask/array/tests/test_array_core.py::test_roll[axis4-9-chunks1] dask/array/tests/test_array_core.py::test_roll[axis4-shift3-chunks0] dask/array/tests/test_array_core.py::test_roll[axis4-shift3-chunks1] dask/array/tests/test_array_core.py::test_roll[axis4-shift4-chunks0] dask/array/tests/test_array_core.py::test_roll[axis4-shift4-chunks1] dask/array/tests/test_array_core.py::test_roll[axis5-3-chunks0] dask/array/tests/test_array_core.py::test_roll[axis5-3-chunks1] dask/array/tests/test_array_core.py::test_roll[axis5-7-chunks0] dask/array/tests/test_array_core.py::test_roll[axis5-7-chunks1] dask/array/tests/test_array_core.py::test_roll[axis5-9-chunks0] dask/array/tests/test_array_core.py::test_roll[axis5-9-chunks1] dask/array/tests/test_array_core.py::test_roll[axis5-shift3-chunks0] dask/array/tests/test_array_core.py::test_roll[axis5-shift3-chunks1] dask/array/tests/test_array_core.py::test_roll[axis5-shift4-chunks0] dask/array/tests/test_array_core.py::test_roll[axis5-shift4-chunks1] dask/array/tests/test_array_core.py::test_reshape[original_shape0-new_shape0-chunks0] dask/array/tests/test_array_core.py::test_reshape[original_shape1-new_shape1-5] dask/array/tests/test_array_core.py::test_reshape[original_shape2-new_shape2-5] dask/array/tests/test_array_core.py::test_reshape[original_shape3-new_shape3-12] dask/array/tests/test_array_core.py::test_reshape[original_shape4-new_shape4-12] dask/array/tests/test_array_core.py::test_reshape[original_shape5-new_shape5-chunks5] dask/array/tests/test_array_core.py::test_reshape[original_shape6-new_shape6-4] dask/array/tests/test_array_core.py::test_reshape[original_shape7-new_shape7-4] dask/array/tests/test_array_core.py::test_reshape[original_shape8-new_shape8-4] dask/array/tests/test_array_core.py::test_reshape[original_shape9-new_shape9-2] dask/array/tests/test_array_core.py::test_reshape[original_shape10-new_shape10-2] dask/array/tests/test_array_core.py::test_reshape[original_shape11-new_shape11-2] dask/array/tests/test_array_core.py::test_reshape[original_shape12-new_shape12-2] dask/array/tests/test_array_core.py::test_reshape[original_shape13-new_shape13-2] dask/array/tests/test_array_core.py::test_reshape[original_shape14-new_shape14-2] dask/array/tests/test_array_core.py::test_reshape[original_shape15-new_shape15-2] dask/array/tests/test_array_core.py::test_reshape[original_shape16-new_shape16-chunks16] dask/array/tests/test_array_core.py::test_reshape[original_shape17-new_shape17-3] dask/array/tests/test_array_core.py::test_reshape[original_shape18-new_shape18-4] dask/array/tests/test_array_core.py::test_reshape[original_shape19-new_shape19-chunks19] dask/array/tests/test_array_core.py::test_reshape[original_shape20-new_shape20-1] dask/array/tests/test_array_core.py::test_reshape[original_shape21-new_shape21-1] dask/array/tests/test_array_core.py::test_reshape[original_shape22-new_shape22-24] dask/array/tests/test_array_core.py::test_reshape[original_shape23-new_shape23-6] dask/array/tests/test_array_core.py::test_reshape[original_shape24-new_shape24-6] dask/array/tests/test_array_core.py::test_reshape[original_shape25-new_shape25-6] dask/array/tests/test_array_core.py::test_reshape[original_shape26-new_shape26-chunks26] dask/array/tests/test_array_core.py::test_reshape[original_shape27-new_shape27-chunks27] dask/array/tests/test_array_core.py::test_reshape[original_shape28-new_shape28-chunks28] dask/array/tests/test_array_core.py::test_reshape[original_shape29-new_shape29-chunks29] dask/array/tests/test_array_core.py::test_reshape[original_shape30-new_shape30-chunks30] dask/array/tests/test_array_core.py::test_reshape[original_shape32-new_shape32-chunks32] dask/array/tests/test_array_core.py::test_reshape[original_shape33-new_shape33-chunks33] dask/array/tests/test_array_core.py::test_reshape[original_shape34-new_shape34-chunks34] dask/array/tests/test_array_core.py::test_reshape_exceptions dask/array/tests/test_array_core.py::test_reshape_splat dask/array/tests/test_array_core.py::test_reshape_fails_for_dask_only dask/array/tests/test_array_core.py::test_reshape_unknown_dimensions dask/array/tests/test_array_core.py::test_full dask/array/tests/test_array_core.py::test_map_blocks dask/array/tests/test_array_core.py::test_map_blocks2 dask/array/tests/test_array_core.py::test_map_blocks_with_constants dask/array/tests/test_array_core.py::test_map_blocks_with_kwargs dask/array/tests/test_array_core.py::test_map_blocks_with_chunks dask/array/tests/test_array_core.py::test_map_blocks_dtype_inference dask/array/tests/test_array_core.py::test_fromfunction dask/array/tests/test_array_core.py::test_from_function_requires_block_args dask/array/tests/test_array_core.py::test_repr dask/array/tests/test_array_core.py::test_slicing_with_ellipsis dask/array/tests/test_array_core.py::test_slicing_with_ndarray dask/array/tests/test_array_core.py::test_dtype dask/array/tests/test_array_core.py::test_blockdims_from_blockshape dask/array/tests/test_array_core.py::test_coerce dask/array/tests/test_array_core.py::test_store_delayed_target dask/array/tests/test_array_core.py::test_store dask/array/tests/test_array_core.py::test_store_regions dask/array/tests/test_array_core.py::test_store_compute_false dask/array/tests/test_array_core.py::test_store_locks dask/array/tests/test_array_core.py::test_np_array_with_zero_dimensions dask/array/tests/test_array_core.py::test_unique dask/array/tests/test_array_core.py::test_dtype_complex dask/array/tests/test_array_core.py::test_astype dask/array/tests/test_array_core.py::test_arithmetic dask/array/tests/test_array_core.py::test_elemwise_consistent_names dask/array/tests/test_array_core.py::test_optimize dask/array/tests/test_array_core.py::test_slicing_with_non_ndarrays dask/array/tests/test_array_core.py::test_getarray dask/array/tests/test_array_core.py::test_squeeze dask/array/tests/test_array_core.py::test_size dask/array/tests/test_array_core.py::test_nbytes dask/array/tests/test_array_core.py::test_itemsize dask/array/tests/test_array_core.py::test_Array_normalizes_dtype dask/array/tests/test_array_core.py::test_from_array_with_lock dask/array/tests/test_array_core.py::test_from_array_slicing_results_in_ndarray dask/array/tests/test_array_core.py::test_asarray dask/array/tests/test_array_core.py::test_from_func dask/array/tests/test_array_core.py::test_topk dask/array/tests/test_array_core.py::test_topk_k_bigger_than_chunk dask/array/tests/test_array_core.py::test_bincount dask/array/tests/test_array_core.py::test_bincount_with_weights dask/array/tests/test_array_core.py::test_bincount_raises_informative_error_on_missing_minlength_kwarg dask/array/tests/test_array_core.py::test_digitize dask/array/tests/test_array_core.py::test_histogram dask/array/tests/test_array_core.py::test_histogram_alternative_bins_range dask/array/tests/test_array_core.py::test_histogram_return_type dask/array/tests/test_array_core.py::test_histogram_extra_args_and_shapes dask/array/tests/test_array_core.py::test_concatenate3_2 dask/array/tests/test_array_core.py::test_map_blocks3 dask/array/tests/test_array_core.py::test_from_array_with_missing_chunks dask/array/tests/test_array_core.py::test_cache dask/array/tests/test_array_core.py::test_take_dask_from_numpy dask/array/tests/test_array_core.py::test_normalize_chunks dask/array/tests/test_array_core.py::test_raise_on_no_chunks dask/array/tests/test_array_core.py::test_chunks_is_immutable dask/array/tests/test_array_core.py::test_raise_on_bad_kwargs dask/array/tests/test_array_core.py::test_long_slice dask/array/tests/test_array_core.py::test_ellipsis_slicing dask/array/tests/test_array_core.py::test_point_slicing dask/array/tests/test_array_core.py::test_point_slicing_with_full_slice dask/array/tests/test_array_core.py::test_slice_with_floats dask/array/tests/test_array_core.py::test_vindex_errors dask/array/tests/test_array_core.py::test_vindex_merge dask/array/tests/test_array_core.py::test_empty_array dask/array/tests/test_array_core.py::test_array dask/array/tests/test_array_core.py::test_cov dask/array/tests/test_array_core.py::test_corrcoef dask/array/tests/test_array_core.py::test_memmap dask/array/tests/test_array_core.py::test_to_npy_stack dask/array/tests/test_array_core.py::test_view dask/array/tests/test_array_core.py::test_view_fortran dask/array/tests/test_array_core.py::test_map_blocks_with_changed_dimension dask/array/tests/test_array_core.py::test_broadcast_chunks dask/array/tests/test_array_core.py::test_chunks_error dask/array/tests/test_array_core.py::test_array_compute_forward_kwargs dask/array/tests/test_array_core.py::test_dont_fuse_outputs dask/array/tests/test_array_core.py::test_dont_dealias_outputs dask/array/tests/test_array_core.py::test_timedelta_op dask/array/tests/test_array_core.py::test_to_delayed dask/array/tests/test_array_core.py::test_cumulative dask/array/tests/test_array_core.py::test_eye dask/array/tests/test_array_core.py::test_diag dask/array/tests/test_array_core.py::test_tril_triu dask/array/tests/test_array_core.py::test_tril_triu_errors dask/array/tests/test_array_core.py::test_atop_names dask/array/tests/test_array_core.py::test_atop_new_axes dask/array/tests/test_array_core.py::test_atop_kwargs dask/array/tests/test_array_core.py::test_atop_chunks dask/array/tests/test_array_core.py::test_from_delayed dask/array/tests/test_array_core.py::test_A_property dask/array/tests/test_array_core.py::test_copy_mutate dask/array/tests/test_array_core.py::test_npartitions dask/array/tests/test_array_core.py::test_astype_gh1151 dask/array/tests/test_array_core.py::test_elemwise_name dask/array/tests/test_array_core.py::test_map_blocks_name dask/array/tests/test_array_core.py::test_from_array_names dask/array/tests/test_array_core.py::test_array_picklable dask/array/tests/test_array_core.py::test_swapaxes dask/array/tests/test_array_core.py::test_from_array_raises_on_bad_chunks dask/array/tests/test_array_core.py::test_concatenate_axes dask/array/tests/test_array_core.py::test_atop_concatenate dask/array/tests/test_array_core.py::test_common_blockdim dask/array/tests/test_array_core.py::test_uneven_chunks_that_fit_neatly dask/array/tests/test_array_core.py::test_elemwise_uneven_chunks dask/array/tests/test_array_core.py::test_uneven_chunks_atop dask/array/tests/test_array_core.py::test_warn_bad_rechunking dask/array/tests/test_array_core.py::test_optimize_fuse_keys dask/array/tests/test_array_core.py::test_round dask/array/tests/test_array_core.py::test_repeat dask/array/tests/test_array_core.py::test_tile[0-shape0-chunks0] dask/array/tests/test_array_core.py::test_tile[0-shape1-chunks1] dask/array/tests/test_array_core.py::test_tile[1-shape0-chunks0] dask/array/tests/test_array_core.py::test_tile[1-shape1-chunks1] dask/array/tests/test_array_core.py::test_tile[2-shape0-chunks0] dask/array/tests/test_array_core.py::test_tile[2-shape1-chunks1] dask/array/tests/test_array_core.py::test_tile[3-shape0-chunks0] dask/array/tests/test_array_core.py::test_tile[3-shape1-chunks1] dask/array/tests/test_array_core.py::test_tile[5-shape0-chunks0] dask/array/tests/test_array_core.py::test_tile[5-shape1-chunks1] dask/array/tests/test_array_core.py::test_tile_neg_reps[-1-shape0-chunks0] dask/array/tests/test_array_core.py::test_tile_neg_reps[-1-shape1-chunks1] dask/array/tests/test_array_core.py::test_tile_neg_reps[-5-shape0-chunks0] dask/array/tests/test_array_core.py::test_tile_neg_reps[-5-shape1-chunks1] dask/array/tests/test_array_core.py::test_tile_array_reps[reps0-shape0-chunks0] dask/array/tests/test_array_core.py::test_tile_array_reps[reps0-shape1-chunks1] dask/array/tests/test_array_core.py::test_tile_array_reps[reps1-shape0-chunks0] dask/array/tests/test_array_core.py::test_tile_array_reps[reps1-shape1-chunks1] dask/array/tests/test_array_core.py::test_concatenate_stack_dont_warn dask/array/tests/test_array_core.py::test_map_blocks_delayed dask/array/tests/test_array_core.py::test_no_chunks dask/array/tests/test_array_core.py::test_no_chunks_2d dask/array/tests/test_array_core.py::test_no_chunks_yes_chunks dask/array/tests/test_array_core.py::test_raise_informative_errors_no_chunks dask/array/tests/test_array_core.py::test_no_chunks_slicing_2d dask/array/tests/test_array_core.py::test_index_array_with_array_1d dask/array/tests/test_array_core.py::test_index_array_with_array_2d dask/array/tests/test_array_core.py::test_setitem_1d dask/array/tests/test_array_core.py::test_setitem_2d dask/array/tests/test_array_core.py::test_setitem_errs dask/array/tests/test_array_core.py::test_zero_slice_dtypes dask/array/tests/test_array_core.py::test_zero_sized_array_rechunk dask/array/tests/test_array_core.py::test_atop_zero_shape dask/array/tests/test_array_core.py::test_atop_zero_shape_new_axes dask/array/tests/test_array_core.py::test_broadcast_against_zero_shape dask/array/tests/test_array_core.py::test_fast_from_array dask/array/tests/test_array_core.py::test_random_from_array dask/array/tests/test_array_core.py::test_concatenate_errs dask/array/tests/test_array_core.py::test_stack_errs dask/array/tests/test_array_core.py::test_transpose_negative_axes dask/array/tests/test_array_core.py::test_atop_with_numpy_arrays dask/array/tests/test_array_core.py::test_elemwise_with_lists[other0-100] dask/array/tests/test_array_core.py::test_elemwise_with_lists[other0-6] dask/array/tests/test_array_core.py::test_elemwise_with_lists[other1-100] dask/array/tests/test_array_core.py::test_elemwise_with_lists[other1-6] dask/array/tests/test_array_core.py::test_elemwise_with_lists[other2-100] dask/array/tests/test_array_core.py::test_elemwise_with_lists[other2-6] dask/array/tests/test_array_core.py::test_constructor_plugin dask/array/tests/test_rechunk.py::test_rechunk_internals_1 dask/array/tests/test_rechunk.py::test_intersect_1 dask/array/tests/test_rechunk.py::test_intersect_2 dask/array/tests/test_rechunk.py::test_rechunk_1d dask/array/tests/test_rechunk.py::test_rechunk_2d dask/array/tests/test_rechunk.py::test_rechunk_4d dask/array/tests/test_rechunk.py::test_rechunk_expand dask/array/tests/test_rechunk.py::test_rechunk_expand2 dask/array/tests/test_rechunk.py::test_rechunk_method dask/array/tests/test_rechunk.py::test_rechunk_blockshape dask/array/tests/test_rechunk.py::test_dtype dask/array/tests/test_rechunk.py::test_rechunk_with_dict dask/array/tests/test_rechunk.py::test_rechunk_with_empty_input dask/array/tests/test_rechunk.py::test_rechunk_with_null_dimensions dask/array/tests/test_rechunk.py::test_rechunk_with_integer dask/array/tests/test_rechunk.py::test_rechunk_0d dask/array/tests/test_rechunk.py::test_rechunk_same dask/array/tests/test_rechunk.py::test_rechunk_intermediates dask/array/tests/test_rechunk.py::test_divide_to_width dask/array/tests/test_rechunk.py::test_merge_to_number dask/array/tests/test_rechunk.py::test_plan_rechunk dask/array/tests/test_rechunk.py::test_plan_rechunk_5d dask/array/tests/test_rechunk.py::test_plan_rechunk_heterogenous dask/array/tests/test_rechunk.py::test_rechunk_warning dask/array/tests/test_rechunk.py::test_dont_concatenate_single_chunks[shape0-chunks0] dask/array/tests/test_rechunk.py::test_dont_concatenate_single_chunks[shape1-chunks1] dask/array/tests/test_rechunk.py::test_dont_concatenate_single_chunks[shape2-chunks2]
dask/array/rechunk.py
dask/array/rechunk.py