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

Method __dask_postpersist__

xarray/namedarray/core.py:641–657  ·  view source on GitHub ↗
(
        self,
    )

Source from the content-addressed store, hash-verified

639 raise AttributeError("Method requires self.data to be a dask array.")
640
641 def __dask_postpersist__(
642 self,
643 ) -> tuple[
644 Callable[
645 [Graph, PostPersistCallable[Any], Any, Any],
646 Self,
647 ],
648 tuple[Any, ...],
649 ]:
650 if is_duck_dask_array(self._data):
651 a: tuple[PostPersistCallable[Any], tuple[Any, ...]]
652 a = self._data.__dask_postpersist__() # type: ignore[no-untyped-call]
653 array_func, array_args = a
654
655 return self._dask_finalize, (array_func,) + array_args
656 else:
657 raise AttributeError("Method requires self.data to be a dask array.")
658
659 def _dask_finalize(
660 self,

Callers

nothing calls this directly

Calls 1

is_duck_dask_arrayFunction · 0.90

Tested by

no test coverage detected