用法:
dask.graph_manipulation.wait_on(*collections, split_every: float | Literal[False] | None = None)
確保在計算任何塊的依賴項之前已計算所有輸入集合的所有塊。
以下示例創建了一個 dask 數組
u
,當用於計算時,僅當數組x
的所有塊都已計算完畢時才會繼續,否則匹配x
:>>> from dask import array as da >>> x = da.ones(10, chunks=5) >>> u = wait_on(x)
以下示例將創建兩個數組
u
和v
,當用於計算時,僅當數組x
和y
的所有塊都已計算完畢,否則匹配x
和y
:>>> x = da.ones(10, chunks=5) >>> y = da.zeros(10, chunks=5) >>> u, v = wait_on(x, y)
- collections:
零個或多個 Dask 集合或 Dask 集合的嵌套結構
- split_every:
- 與
collections
相同 與輸入具有相同類型的 Dask 集合,其計算結果相同,或者與原始集合已被替換的輸入等效的嵌套結構。
- 與
參數:
返回:
相關用法
- Python dask.graph_manipulation.bind用法及代碼示例
- Python dask.graph_manipulation.clone用法及代碼示例
- Python dask.dataframe.Series.apply用法及代碼示例
- Python dask.dataframe.to_records用法及代碼示例
- Python dask.dataframe.DataFrame.applymap用法及代碼示例
- Python dask.dataframe.Series.clip用法及代碼示例
- Python dask.array.stats.ttest_ind用法及代碼示例
- Python dask.array.ma.masked_values用法及代碼示例
- Python dask.array.divmod用法及代碼示例
- Python dask.compute用法及代碼示例
- Python dask.dataframe.Series.prod用法及代碼示例
- Python dask.dataframe.Series.fillna用法及代碼示例
- Python dask.dataframe.DataFrame.sub用法及代碼示例
- Python dask.bag.Bag.frequencies用法及代碼示例
- Python dask.config.set用法及代碼示例
- Python dask.dataframe.compute用法及代碼示例
- Python dask.array.negative用法及代碼示例
- Python dask.array.overlap.map_overlap用法及代碼示例
- Python dask.dataframe.DataFrame.mod用法及代碼示例
- Python dask.array.stats.ttest_rel用法及代碼示例
注:本文由純淨天空篩選整理自dask.org大神的英文原創作品 dask.graph_manipulation.wait_on。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。