Skip to content

Commit 37ecca9

Browse files
orianacJoe Hamman
andauthored
Update xarray_schema/core.py
Co-authored-by: Joe Hamman <[email protected]>
1 parent 10416d4 commit 37ecca9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xarray_schema/core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def validate(self, da: xr.DataArray) -> xr.DataArray:
109109
for key, ec in self.chunks.items():
110110
if isinstance(ec, int):
111111
# handles case of expected chunksize is shorthand of -1 which translates to the full length of dimension
112-
if ec==-1:
112+
if ec < 0:
113113
ec = len(da[key])
114114
# grab the first entry in da's tuple of chunks to be representative (as it should be assuming they're regular)
115115
ac = dim_chunks[key][0]

0 commit comments

Comments
 (0)