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

Method persist

xarray/core/dataset.py:822–847  ·  view source on GitHub ↗

Trigger computation, keeping data as chunked arrays. This operation can be used to trigger computation on underlying dask arrays, similar to ``.compute()`` or ``.load()``. However this operation keeps the data as dask arrays. This is particularly useful when using t

(self, **kwargs)

Source from the content-addressed store, hash-verified

820 return self
821
822 def persist(self, **kwargs) -> Self:
823 """Trigger computation, keeping data as chunked arrays.
824
825 This operation can be used to trigger computation on underlying dask
826 arrays, similar to ``.compute()`` or ``.load()``. However this
827 operation keeps the data as dask arrays. This is particularly useful
828 when using the dask.distributed scheduler and you want to load a large
829 amount of data into distributed memory.
830 Like compute (but unlike load), the original dataset is left unaltered.
831
832 Parameters
833 ----------
834 **kwargs : dict
835 Additional keyword arguments passed on to ``dask.persist``.
836
837 Returns
838 -------
839 object : Dataset
840 New object with all dask-backed coordinates and data variables as persisted dask arrays.
841
842 See Also
843 --------
844 dask.persist
845 """
846 new = self.copy(deep=False)
847 return new._persist_inplace(**kwargs)
848
849 @classmethod
850 def _construct_direct(

Callers 5

_persist_inplaceMethod · 0.45
test_persistMethod · 0.45
test_persistMethod · 0.45
test_persistMethod · 0.45
test_asyncFunction · 0.45

Calls 2

copyMethod · 0.95
_persist_inplaceMethod · 0.45

Tested by 4

test_persistMethod · 0.36
test_persistMethod · 0.36
test_persistMethod · 0.36
test_asyncFunction · 0.36