html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/4372#issuecomment-682756591,https://api.github.com/repos/pydata/xarray/issues/4372,682756591,MDEyOklzc3VlQ29tbWVudDY4Mjc1NjU5MQ==,2448579,2020-08-28T15:52:03Z,2020-08-28T15:52:03Z,MEMBER,"So to maintain backward compatibility, we should add that same check ``` python # core dimensions cannot span multiple chunks for axis, dim in enumerate(core_dims, start=-len(core_dims)): if len(data.chunks[axis]) != 1: raise ValueError( ""dimension {!r} on {}th function argument to "" ""apply_ufunc with dask='parallelized' consists of "" ""multiple chunks, but is also a core dimension. To "" ""fix, rechunk into a single dask array chunk along "" ""this dimension, i.e., ``.chunk({})``, but beware "" ""that this may significantly increase memory usage."".format( dim, n, {dim: -1} ) ) ``` and set `allow_rechunk=True`. We could deprecate and remove this check in a couple of versions but I don't know if it's worth the effort...","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,684930038 https://github.com/pydata/xarray/issues/4372#issuecomment-680940858,https://api.github.com/repos/pydata/xarray/issues/4372,680940858,MDEyOklzc3VlQ29tbWVudDY4MDk0MDg1OA==,2448579,2020-08-26T15:10:05Z,2020-08-26T15:10:05Z,MEMBER,"Copying over that comment... > I am pretty confident that existing behavior of xarray.apply_ufunc with un-equal chunks along non-core dimensions is entirely broken. I am OK with just erroring for now. @shoyer could you please clarify what you meant? For example, this works with v0.16.0 but fails on master ``` python import operator import numpy as np import xarray as xr a = xr.DataArray(np.ones((10, 10)), dims=(""a"", ""b"")).chunk({""a"": 2, ""b"": 1}) b = xr.DataArray(np.ones((10, 10)), dims=(""a"", ""b"")).chunk({""a"": -1, ""b"": 4}) xr.apply_ufunc( operator.add, a, b, dask=""parallelized"", output_dtypes=[a.dtype], ).compute().equals(a.compute() + b.compute()) ```","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,684930038 https://github.com/pydata/xarray/issues/4372#issuecomment-679337446,https://api.github.com/repos/pydata/xarray/issues/4372,679337446,MDEyOklzc3VlQ29tbWVudDY3OTMzNzQ0Ng==,2448579,2020-08-24T20:03:42Z,2020-08-24T20:03:42Z,MEMBER,(this is causing downstream test failures: https://github.com/NCAR/pop-tools/pull/59; thanks @mnlevy1981),"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,684930038