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

Method load

xarray/core/variable.py:993–1023  ·  view source on GitHub ↗

Trigger loading data into memory and return this variable. Data will be computed and/or loaded from disk or a remote source. Unlike ``.compute``, the original variable is modified and returned. Normally, it should not be necessary to call this method in user code,

(self, **kwargs)

Source from the content-addressed store, hash-verified

991 return type(self)(dims, data, attrs, encoding, fastpath=True)
992
993 def load(self, **kwargs) -> Self:
994 """Trigger loading data into memory and return this variable.
995
996 Data will be computed and/or loaded from disk or a remote source.
997
998 Unlike ``.compute``, the original variable is modified and returned.
999
1000 Normally, it should not be necessary to call this method in user code,
1001 because all xarray functions should either work on deferred data or
1002 load data automatically.
1003
1004 Parameters
1005 ----------
1006 **kwargs : dict
1007 Additional keyword arguments passed on to ``dask.array.compute``.
1008
1009 Returns
1010 -------
1011 object : Variable
1012 Same object but with lazy data as an in-memory array.
1013
1014 See Also
1015 --------
1016 dask.array.compute
1017 Variable.compute
1018 Variable.load_async
1019 DataArray.load
1020 Dataset.load
1021 """
1022 self._data = to_duck_array(self._data, **kwargs)
1023 return self
1024
1025 async def load_async(self, **kwargs) -> Self:
1026 """Trigger and await asynchronous loading of data into memory and return this variable.

Callers 2

computeMethod · 0.45

Calls 1

to_duck_arrayFunction · 0.90

Tested by 1