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 9aca0cc commit a3f47a9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion xarray/namedarray/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,14 @@ def device(self) -> _Device:

@property
def mT(self):
raise NotImplementedError("Todo: ")
if isinstance(self._data, _arrayapi):
from xarray.namedarray._array_api._utils import _infer_dims

_data = self._data.mT
_dims = _infer_dims(_data.shape)
return self._new(_dims, _data)
else:
raise NotImplementedError("self._data missing mT")

@property
def ndim(self) -> int:
Expand Down

0 comments on commit a3f47a9

Please sign in to comment.