Skip to content

Commit 4820952

Browse files
Juan Daniel TorresJuan Daniel Torres
authored andcommitted
add f
1 parent f8be489 commit 4820952

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -379,19 +379,19 @@ Let us consider the computation below which has a slow but reusable part, and a
379379
```{code-cell} ipython3
380380
import time
381381
382-
def f(x, y):
383-
return (g(x) + h(y))**2
382+
def f(x):
383+
return g(int(x)) + h(x % 1)
384384
385385
386386
def g(x):
387387
"""Slow but reusable function"""
388388
time.sleep(random.randrange(5))
389-
return x**3
389+
return x**2
390390
391391
392392
def h(x):
393393
"""Fast function"""
394-
return x**4
394+
return x**3
395395
```
396396

397397
We need to convert `f` into a dask graph by using `dask.delayed`.

0 commit comments

Comments
 (0)