Data Science/Python
[python] Dask Parallel Computing Example
Here is an example of using Dask's Client to set up a distributed cluster and perform a computation in parallel: from dask.distributed import Client # Start a local cluster with 2 worker threads client = Client(n_workers=2) # Define a computation as a normal Python function def my_computation(x): return x * x # Use the client to submit the computation as a task to the cluster results = client.ma..
2023. 1. 28. 23:23
최근댓글