Skip to content

Commit 10416d4

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

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xarray_schema/core.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ def validate(self, da: xr.DataArray) -> xr.DataArray:
7272
------
7373
SchemaError
7474
'''
75-
assert isinstance(da, xr.core.dataarray.DataArray),'Input is not an xarray DataArray and schema for chunks are not yet implemented'
75+
if not isinstance(da, xr.DataArray):
76+
raise ValueError('Input must be a xarray.DataArray')
7677

7778
if self.dtype is not None and not np.issubdtype(da.dtype, self.dtype):
7879
raise SchemaError(f'dtype {da.dtype} != {self.dtype}')

0 commit comments

Comments
 (0)