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

Function _cfoffset

xarray/computation/computation.py:933–938  ·  view source on GitHub ↗
(x: DataArray)

Source from the content-addressed store, hash-verified

931 from xarray.core.dataset import Dataset
932
933 def _cfoffset(x: DataArray) -> Any:
934 scalar = x.compute().data[0]
935 if not is_scalar(scalar):
936 # we do not get a scalar back on dask == 2021.04.1
937 scalar = scalar.item()
938 return type(scalar)(1970, 1, 1)
939
940 def to_floatable(x: DataArray) -> DataArray:
941 if x.dtype.kind in "MO":

Callers 1

to_floatableFunction · 0.85

Calls 3

is_scalarFunction · 0.90
typeFunction · 0.85
computeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…