Skip to content

Commit

Permalink
stricter
Browse files Browse the repository at this point in the history
  • Loading branch information
Illviljan committed Aug 25, 2024
1 parent d277ab1 commit 0b2f21b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions xarray/namedarray/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,10 @@ def __init__(
data: duckarray[Any, _DType_co],
attrs: _AttrsLike = None,
):
if not isinstance(data, _arrayfunction_or_api):
raise NotImplementedError(
f"data is not a valid duckarray, got {data=}, {dims=}"
)
self._data = data
self._dims = self._parse_dimensions(dims)
self._attrs = dict(attrs) if attrs else None
Expand Down

0 comments on commit 0b2f21b

Please sign in to comment.