Skip to content

Commit

Permalink
Update core.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Illviljan committed Aug 25, 2024
1 parent ce8a60a commit bef1ead
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xarray/namedarray/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ def __getitem__(self, key: _IndexKeyLike | NamedArray) -> NamedArray:
from xarray.namedarray._array_api._utils import _atleast_0d, _infer_dims

if isinstance(key, int | slice | tuple):
_data = _atleast_0d(self._data[key], self._data._array_namespace__())
_data = _atleast_0d(self._data[key], self._data.__array_namespace__())
_dims = _infer_dims(_data.shape) # TODO: fix
return self._new(_dims, _data)
elif isinstance(key, NamedArray):
Expand Down

0 comments on commit bef1ead

Please sign in to comment.