-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Description
We can define dask graph using function and key name as below.
def f(x):
return x
dsk = {('x', 0): np.array([1, 2]),
('y', 0): np.array([1, 2]),
('x', 1): (f, ('y', 0))}
# OK
darr = da.Array(dsk, 'x', chunks=(2, ), shape=(4, ))
darr.compute()
# array([1, 2, 1, 2])
However, if the argument has the same name as the final output (final Array's name), it raises KeyError because current dependency search doesn't includes keys in the final output.
dsk = {('x', 0): np.array([1, 2]),
('x', 1): (f, ('x', 0))}
darr = da.Array(dsk, 'x', chunks=(2, ), shape=(4, ))
darr.compute()
# /Users/sin/Documents/Git/dask/dask/core.pyc in get_dependencies(dsk, task, as_list)
# 201 set(['x'])
# 202 """
# --> 203 args = [dsk[task]]
# 204 result = []
# 205 while args:
# KeyError: ('x', 0)
I think it can be allowed without problems?
This is related to #885. The algorithm uses previous LU decomposition results of blocks on the diagonal.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels