id,node_id,number,title,user,state,locked,assignee,milestone,comments,created_at,updated_at,closed_at,author_association,active_lock_reason,draft,pull_request,body,reactions,performed_via_github_app,state_reason,repo,type 1171932478,I_kwDOAMm_X85F2kU-,6373,Zarr backend should avoid checking for invalid encodings,2448579,closed,0,,,3,2022-03-17T04:55:35Z,2022-03-18T10:06:01Z,2022-03-18T04:19:48Z,MEMBER,,,,"### What is your issue? The zarr backend has a list of ""valid"" encodings that needs to be updated any time zarr adds something new (e.g. https://github.com/pydata/xarray/pull/6348) https://github.com/pydata/xarray/blob/53172cb1e03a98759faf77ef48efaa64676ad24a/xarray/backends/zarr.py#L215-L234 Can we get rid of this? I don't know the backends code well, but won't all our encoding parameters have been removed by this stage? The `raise_on_invalid` kwarg suggests so. @tomwhite points out that zarr will raise a warning: ``` python >>> zarr.create((1,), blah=1) /Users/tom/miniconda/envs/sgkit-3.8/lib/python3.8/site-packages/zarr/creation.py:221: UserWarning: ignoring keyword argument 'blah' warn('ignoring keyword argument %r' % k) ```","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6373/reactions"", ""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue 1171916710,I_kwDOAMm_X85F2gem,6372,"apply_ufunc + dask=""parallelized"" + no core dimensions should raise a nicer error about core dimensions being absent",2448579,open,0,,,0,2022-03-17T04:25:37Z,2022-03-17T05:10:16Z,,MEMBER,,,,"### What happened? From https://github.com/pydata/xarray/discussions/6370 Calling `apply_ufunc(..., dask=""parallelized"")` with no core dimensions and dask input ""works"" but raises an error on compute (`ValueError: axes don't match array` from `np.transpose`). ``` python xr.apply_ufunc( lambda x: np.mean(x), dt, dask=""parallelized"" ) ``` ### What did you expect to happen? With numpy data the apply_ufunc call does raise an error: ``` xr.apply_ufunc( lambda x: np.mean(x), dt.compute(), dask=""parallelized"" ) ``` ``` ValueError: applied function returned data with unexpected number of dimensions. Received 0 dimension(s) but expected 1 dimensions with names: ('x',) ``` ### Minimal Complete Verifiable Example ``` python import xarray as xr dt = xr.Dataset( data_vars=dict( value=([""x""], [1,1,2,2,2,3,3,3,3,3]), ), coords=dict( lon=([""x""], np.linspace(0,1,10)), ), ).chunk(chunks={'x': tuple([2,3,5])}) # three chunks of different size xr.apply_ufunc( lambda x: np.mean(x), dt, dask=""parallelized"" ) ``` ### Relevant log output _No response_ ### Anything else we need to know? _No response_ ### Environment N/A","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/6372/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,issue