MCPcopy
hub / github.com/pydata/xarray / T

Method T

xarray/namedarray/core.py:1054–1061  ·  view source on GitHub ↗

Return a new object with transposed dimensions.

(self)

Source from the content-addressed store, hash-verified

1052
1053 @property
1054 def T(self) -> NamedArray[Any, _DType_co]:
1055 """Return a new object with transposed dimensions."""
1056 if self.ndim != 2:
1057 raise ValueError(
1058 f"x.T requires x to have 2 dimensions, got {self.ndim}. Use x.permute_dims() to permute dimensions."
1059 )
1060
1061 return self.permute_dims()
1062
1063 def broadcast_to(
1064 self, dim: Mapping[_Dim, int] | None = None, **dim_kwargs: Any

Callers

nothing calls this directly

Calls 1

permute_dimsMethod · 0.95

Tested by

no test coverage detected