MCPcopy Create free account
hub / github.com/dask/dask / compute

Method compute

dask/base.py:349–374  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

347 return result
348
349 def compute(self, **kwargs):
350 """Compute this dask collection
351
352 This turns a lazy Dask collection into its in-memory equivalent.
353 For example a Dask array turns into a NumPy array and a Dask dataframe
354 turns into a Pandas dataframe. The entire dataset must fit into memory
355 before calling this operation.
356
357 Parameters
358 ----------
359 scheduler : string, optional
360 Which scheduler to use like "threads", "synchronous" or "processes".
361 If not provided, the default is to check the global settings first,
362 and then fall back to the collection defaults.
363 optimize_graph : bool, optional
364 If True [default], the graph is optimized before computation.
365 Otherwise the graph is run as is. This can be useful for debugging.
366 kwargs
367 Extra keywords to forward to the scheduler function.
368
369 See Also
370 --------
371 dask.compute
372 """
373 (result,) = compute(self, traverse=False, **kwargs)
374 return result
375
376 def __await__(self):
377 try:

Callers

nothing calls this directly

Calls 1

computeFunction · 0.70

Tested by

no test coverage detected