Skip to content

Commit 96d02bb

Browse files
authored
Move imports
1 parent db4c209 commit 96d02bb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

docs/source/tutorial/tutorial.advanced-topics.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,7 @@ adaptive.notebook_extension()
2626
import asyncio
2727
from functools import partial
2828
import random
29-
import time
30-
from dask.distributed import Client
29+
3130
3231
offset = random.uniform(-0.5, 0.5)
3332
@@ -376,6 +375,8 @@ We require an asynchronous client to perform the execution of asynchronous tasks
376375
In this case, it is imported from `dask.distributed`.
377376

378377
```{code-cell} ipython3
378+
from dask.distributed import Client
379+
379380
client = await Client(asynchronous=True)
380381
```
381382

@@ -386,6 +387,8 @@ In this case, we consider a function `h` that has some internal dependency on a
386387
The function to be learned is `async_h`, which submits `h` as a coroutine to the client.
387388

388389
```{code-cell} ipython3
390+
import time
391+
389392
def h(x, offset=offset):
390393
a = 0.01
391394
x = g(x)

0 commit comments

Comments
 (0)