Trigger and await asynchronous loading of 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. Only works when opening data lazily from IO storage b
(self, **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. |
| 1027 | |
| 1028 | Data will be computed and/or loaded from disk or a remote source. |
| 1029 | |
| 1030 | Unlike ``.compute``, the original variable is modified and returned. |
| 1031 | |
| 1032 | Only works when opening data lazily from IO storage backends which support lazy asynchronous loading. |
| 1033 | Otherwise will raise a NotImplementedError. |
| 1034 | |
| 1035 | Note users are expected to limit concurrency themselves - xarray does not internally limit concurrency in any way. |
| 1036 | |
| 1037 | Parameters |
| 1038 | ---------- |
| 1039 | **kwargs : dict |
| 1040 | Additional keyword arguments passed on to ``dask.array.compute``. |
| 1041 | |
| 1042 | Returns |
| 1043 | ------- |
| 1044 | object : Variable |
| 1045 | Same object but with lazy data as an in-memory array. |
| 1046 | |
| 1047 | See Also |
| 1048 | -------- |
| 1049 | dask.array.compute |
| 1050 | Variable.load |
| 1051 | Variable.compute |
| 1052 | DataArray.load_async |
| 1053 | Dataset.load_async |
| 1054 | """ |
| 1055 | self._data = await async_to_duck_array(self._data, **kwargs) |
| 1056 | return self |
| 1057 | |
| 1058 | def compute(self, **kwargs) -> Self: |
| 1059 | """Trigger loading data into memory and return a new variable. |
nothing calls this directly
no test coverage detected