Closed
Description
Sample error from https://travis-ci.org/pydata/xarray/jobs/466431752
_______________________ test_dataarray_with_dask_coords ________________________
def test_dataarray_with_dask_coords():
import toolz
x = xr.Variable('x', da.arange(8, chunks=(4,)))
y = xr.Variable('y', da.arange(8, chunks=(4,)) * 2)
data = da.random.random((8, 8), chunks=(4, 4)) + 1
array = xr.DataArray(data, dims=['x', 'y'])
array.coords['xx'] = x
array.coords['yy'] = y
assert dict(array.__dask_graph__()) == toolz.merge(data.__dask_graph__(),
x.__dask_graph__(),
y.__dask_graph__())
> (array2,) = dask.compute(array)
xarray/tests/test_dask.py:824:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../miniconda/envs/test_env/lib/python3.6/site-packages/dask/base.py:395: in compute
dsk = collections_to_dsk(collections, optimize_graph, **kwargs)
../../../miniconda/envs/test_env/lib/python3.6/site-packages/dask/base.py:187: in collections_to_dsk
for opt, val in groups.items()}
../../../miniconda/envs/test_env/lib/python3.6/site-packages/dask/base.py:187: in <dictcomp>
for opt, val in groups.items()}
../../../miniconda/envs/test_env/lib/python3.6/site-packages/dask/base.py:212: in _extract_graph_and_keys
graph = merge(*graphs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dicts = <dask.sharedict.ShareDict object at 0x7f307d29a128>, kwargs = {}
factory = <class 'dict'>, rv = {}
d = ('arange-36f53ab1e6153a63bbf7f4f8ff56693c', 0)
def merge(*dicts, **kwargs):
""" Merge a collection of dictionaries
>>> merge({1: 'one'}, {2: 'two'})
{1: 'one', 2: 'two'}
Later dictionaries have precedence
>>> merge({1: 2, 3: 4}, {3: 3, 4: 4})
{1: 2, 3: 3, 4: 4}
See Also:
merge_with
"""
if len(dicts) == 1 and not isinstance(dicts[0], dict):
dicts = dicts[0]
factory = _get_factory(merge, kwargs)
rv = factory()
for d in dicts:
> rv.update(d)
E ValueError: dictionary update sequence element #0 has length 39; 2 is required
../../../miniconda/envs/test_env/lib/python3.6/site-packages/toolz/dicttoolz.py:39: ValueError
Metadata
Metadata
Assignees
Labels
No labels