We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 70ee97c commit 10416d4Copy full SHA for 10416d4
xarray_schema/core.py
@@ -72,7 +72,8 @@ def validate(self, da: xr.DataArray) -> xr.DataArray:
72
------
73
SchemaError
74
'''
75
- assert isinstance(da, xr.core.dataarray.DataArray),'Input is not an xarray DataArray and schema for chunks are not yet implemented'
+ if not isinstance(da, xr.DataArray):
76
+ raise ValueError('Input must be a xarray.DataArray')
77
78
if self.dtype is not None and not np.issubdtype(da.dtype, self.dtype):
79
raise SchemaError(f'dtype {da.dtype} != {self.dtype}')
0 commit comments