Skip to content

Commit

Permalink
avoid toolz in optimize.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mrocklin committed Oct 23, 2015
1 parent ab18cb2 commit ffcd121
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions dask/optimize.py
Expand Up @@ -3,14 +3,16 @@
from itertools import count
from operator import getitem

from toolz import identity

from .compatibility import zip_longest
from .core import (istask, get_dependencies, subs, toposort, flatten,
reverse_dict, add, inc, ishashable, preorder_traversal)
from .rewrite import END


def identity(x):
return x


def cull(dsk, keys):
""" Return new dask with only the tasks required to calculate keys.
Expand Down
1 change: 1 addition & 0 deletions dask/rewrite.py
@@ -1,6 +1,7 @@
from __future__ import absolute_import, division, print_function

from collections import deque

from dask.core import istask, subs


Expand Down
5 changes: 3 additions & 2 deletions dask/tests/test_optimize.py
@@ -1,9 +1,10 @@
from itertools import count
from operator import add, mul, getitem
from toolz import partial, identity
from functools import partial
from dask.utils import raises
from dask.optimize import (cull, fuse, inline, inline_functions, functions_of,
dealias, equivalent, sync_keys, merge_sync, fuse_getitem, fuse_selections)
dealias, equivalent, sync_keys, merge_sync, fuse_getitem,
fuse_selections, identity)


def inc(x):
Expand Down

0 comments on commit ffcd121

Please sign in to comment.