MCPcopy Index your code
hub / github.com/pydata/xarray / short_data_repr

Function short_data_repr

xarray/core/formatting.py:697–709  ·  view source on GitHub ↗

Format "data" for DataArray and Variable.

(array)

Source from the content-addressed store, hash-verified

695
696
697def short_data_repr(array):
698 """Format "data" for DataArray and Variable."""
699 internal_data = getattr(array, "variable", array)._data
700
701 if isinstance(array, np.ndarray):
702 return short_array_repr(array)
703 elif is_duck_array(internal_data):
704 return limit_lines(repr(array.data), limit=40)
705 elif getattr(array, "_in_memory", None):
706 return short_array_repr(array)
707 else:
708 # internal xarray array type
709 return f"[{array.size} values with dtype={array.dtype}]"
710
711
712def _get_indexes_dict(indexes):

Callers 2

short_data_repr_htmlFunction · 0.90
array_reprFunction · 0.85

Calls 3

is_duck_arrayFunction · 0.90
short_array_reprFunction · 0.85
limit_linesFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…