Skip to content

Latest commit

 

History

History
22 lines (19 loc) · 333 Bytes

README.md

File metadata and controls

22 lines (19 loc) · 333 Bytes

dask2py

Utility for printing executable Python code from a dask graph.

Usage:

from dask2py import dask2py
def inc(x):
    return 1 + x
def add(x, y):
    return x + y

dsk = {'a': 1, 'b': 2, 'c': (inc, 'a'), 'd': (add, 'b', 'c')}
print('\n'.join(dask2py(dsk, 'd')))

Output:

a = 1
b = 2
c = inc(a)
d = add(b, c)