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

Method _repr_inline_

xarray/core/indexing.py:2044–2050  ·  view source on GitHub ↗
(self, max_width: int)

Source from the content-addressed store, hash-verified

2042 return self.array # self.array should be always one-dimensional
2043
2044 def _repr_inline_(self, max_width: int) -> str:
2045 # we want to display values in the inline repr for lazy coordinates too
2046 # (pd.RangeIndex and pd.MultiIndex). `format_array_flat` prevents loading
2047 # the whole array in memory.
2048 from xarray.core.formatting import format_array_flat
2049
2050 return format_array_flat(self, max_width)
2051
2052 def __repr__(self) -> str:
2053 return f"{type(self).__name__}(array={self.array!r}, dtype={self.dtype!r})"

Callers 1

_repr_inline_Method · 0.45

Calls 1

format_array_flatFunction · 0.90

Tested by

no test coverage detected