Skip to content

Commit

Permalink
ignore typing
Browse files Browse the repository at this point in the history
  • Loading branch information
andersy005 committed Jan 26, 2024
1 parent 7c3de30 commit a6ad9b8
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions xarray/namedarray/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -897,14 +897,7 @@ def permute_dims(
if not dim:
dims = self.dims[::-1]
else:
# Flatten the tuple and handle ellipsis
flattened_dims: list[_Dim] = []
for item in dim:
if item is ...:
flattened_dims.extend(self.dims)
else:
flattened_dims.extend(item)
dims = tuple(infix_dims(flattened_dims, self.dims, missing_dims))
dims = tuple(infix_dims(dim, self.dims, missing_dims)) # type: ignore

if len(dims) < 2 or dims == self.dims:
# no need to transpose if only one dimension
Expand Down

0 comments on commit a6ad9b8

Please sign in to comment.