Description
What happened?
I have just updated my development branch of xarray to latest main. No other changes.
When using .chunk()
on a Variable xarray crashes.
What did you expect to happen?
No crash
Minimal Complete Verifiable Example
import numpy as np
import pandas as pd
import xarray as xr
t_size = 8000
t = np.arange(t_size)
var = xr.Variable(dims=("T",), data=np.random.randn(t_size)).chunk()
MVCE confirmation
- Minimal example — the example is as focused as reasonably possible to demonstrate the underlying issue in xarray.
- Complete example — the example is self-contained, including all data and the text of any traceback.
- Verifiable example — the example copy & pastes into an IPython prompt or Binder notebook, returning the result.
- New issue — a search of GitHub Issues suggests this is not a duplicate.
Relevant log output
Traceback (most recent call last):
File "C:\Users\J.W\AppData\Local\Temp\ipykernel_6480\4053253683.py", line 8, in <cell line: 8>
var = xr.Variable(dims=("T",), data=np.random.randn(t_size)).chunk()
File "C:\Users\J.W\Documents\GitHub\xarray\xarray\core\variable.py", line 1249, in chunk
chunkmanager = guess_chunkmanager(chunked_array_type)
File "C:\Users\J.W\Documents\GitHub\xarray\xarray\core\parallelcompat.py", line 87, in guess_chunkmanager
raise ValueError(
ValueError: unrecognized chunk manager dask - must be one of: []
Anything else we need to know?
Likely from #7019.
Environment
xr.show_versions()
C:\Users\J.W\anaconda3\envs\xarray-tests\lib\site-packages_distutils_hack_init_.py:33: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
INSTALLED VERSIONS
commit: None
python: 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:30:19) [MSC v.1929 64 bit (AMD64)]
python-bits: 64
OS: Windows
OS-release: 10
machine: AMD64
processor: Intel64 Family 6 Model 58 Stepping 9, GenuineIntel
byteorder: little
LC_ALL: None
LANG: en
LOCALE: ('Swedish_Sweden', '1252')
libhdf5: 1.12.2
libnetcdf: 4.8.1
xarray: 2022.9.1.dev266+gbd01f9cc.d20221006
pandas: 1.5.2
numpy: 1.23.5
scipy: 1.9.3
netCDF4: 1.6.0
pydap: installed
h5netcdf: 1.0.2
h5py: 3.7.0
Nio: None
zarr: 2.13.2
cftime: 1.6.2
nc_time_axis: 1.4.1
PseudoNetCDF: 3.2.2
iris: 3.3.0
bottleneck: 1.3.5
dask: 2022.9.2
distributed: 2022.9.2
matplotlib: 3.6.2
cartopy: 0.21.0
seaborn: 0.13.0.dev0
numbagg: 0.2.1
fsspec: 2022.10.0
cupy: None
pint: 0.19.2
sparse: 0.13.0
flox: 999
numpy_groupies: 0.9.14+22.g19c7601
setuptools: 65.5.1
pip: 22.3.1
conda: None
pytest: 7.2.0
mypy: 1.2.0
IPython: 7.33.0
sphinx: 5.3.0