Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Sep 30, 2024
1 parent 1825af3 commit 81a2706
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xarray/tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -6259,10 +6259,10 @@ def test_zarr_safe_chunk_region(tmp_path):

# Test if the code is detecting the last chunk correctly
data = np.random.RandomState(0).randn(2920, 25, 53)
ds = xr.Dataset({'temperature': (('time', 'lat', 'lon'), data)})
chunks = {'time': 1000, 'lat': 25, 'lon': 53}
ds = xr.Dataset({"temperature": (("time", "lat", "lon"), data)})
chunks = {"time": 1000, "lat": 25, "lon": 53}
ds.chunk(chunks).to_zarr(store, compute=False)

Check failure on line 6264 in xarray/tests/test_backends.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.12

test_zarr_safe_chunk_region zarr.errors.ContainsGroupError: path '' contains a group

Check failure on line 6264 in xarray/tests/test_backends.py

View workflow job for this annotation

GitHub Actions / macos-latest py3.10

test_zarr_safe_chunk_region zarr.errors.ContainsGroupError: path '' contains a group

Check failure on line 6264 in xarray/tests/test_backends.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10 min-all-deps

test_zarr_safe_chunk_region zarr.errors.ContainsGroupError: path '' contains a group

Check failure on line 6264 in xarray/tests/test_backends.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.12 all-but-numba

test_zarr_safe_chunk_region zarr.errors.ContainsGroupError: path '' contains a group

Check failure on line 6264 in xarray/tests/test_backends.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.10

test_zarr_safe_chunk_region zarr.errors.ContainsGroupError: path '' contains a group

Check failure on line 6264 in xarray/tests/test_backends.py

View workflow job for this annotation

GitHub Actions / ubuntu-latest py3.12

test_zarr_safe_chunk_region zarr.errors.ContainsGroupError: path '' contains a group
region = {'time': slice(1000, 2000, 1)}
region = {"time": slice(1000, 2000, 1)}
chunk = ds.isel(region)
chunk = chunk.chunk()
chunk.chunk().to_zarr(store, region=region)

0 comments on commit 81a2706

Please sign in to comment.