Compute this dask collection This turns a lazy Dask collection into its in-memory equivalent. For example a Dask array turns into a NumPy array and a Dask dataframe turns into a Pandas dataframe. The entire dataset must fit into memory before calling this operation.
(self, **kwargs)
| 366 | return result |
| 367 | |
| 368 | def compute(self, **kwargs): |
| 369 | """Compute this dask collection |
| 370 | |
| 371 | This turns a lazy Dask collection into its in-memory equivalent. |
| 372 | For example a Dask array turns into a NumPy array and a Dask dataframe |
| 373 | turns into a Pandas dataframe. The entire dataset must fit into memory |
| 374 | before calling this operation. |
| 375 | |
| 376 | Parameters |
| 377 | ---------- |
| 378 | scheduler : string, optional |
| 379 | Which scheduler to use like "threads", "synchronous" or "processes". |
| 380 | If not provided, the default is to check the global settings first, |
| 381 | and then fall back to the collection defaults. |
| 382 | optimize_graph : bool, optional |
| 383 | If True [default], the graph is optimized before computation. |
| 384 | Otherwise the graph is run as is. This can be useful for debugging. |
| 385 | kwargs |
| 386 | Extra keywords to forward to the scheduler function. |
| 387 | |
| 388 | See Also |
| 389 | -------- |
| 390 | dask.compute |
| 391 | """ |
| 392 | (result,) = compute(self, traverse=False, **kwargs) |
| 393 | return result |
| 394 | |
| 395 | def __await__(self): |
| 396 | try: |