Skip to content

dask master test failure #3303

@dcherian

Description

@dcherian

Failure on py37-upstream-dev with dask 2.3.0+32.gefb1743e pypi_0 pypi

=================================== FAILURES ===================================
____________________________ test_interpolate_dask _____________________________

    @requires_dask
    def test_interpolate_dask():
        da, _ = make_interpolate_example_data((40, 40), 0.5)
        da = da.chunk({"x": 5})
>       actual = da.interpolate_na("time")

xarray/tests/test_missing.py:312: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
xarray/core/dataarray.py:2018: in interpolate_na
    **kwargs
xarray/core/missing.py:250: in interp_na
    keep_attrs=True,
xarray/core/computation.py:1057: in apply_ufunc
    keep_attrs=keep_attrs
xarray/core/computation.py:239: in apply_dataarray_vfunc
    result_var = func(*data_vars)
xarray/core/computation.py:609: in apply_variable_ufunc
    result_data = func(*input_data)
xarray/core/computation.py:599: in func
    output_sizes,
xarray/core/computation.py:729: in _apply_blockwise
    new_axes=output_sizes
/usr/share/miniconda/envs/xarray-tests/lib/python3.7/site-packages/dask/array/blockwise.py:195: in blockwise
    token or utils.funcname(func).strip("_"),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

func = <numpy.vectorize object at 0x7efdc0762c50>

    def funcname(func):
        """Get the name of a function."""
        # functools.partial
        if isinstance(func, functools.partial):
            return funcname(func.func)
        # methodcaller
        if isinstance(func, methodcaller):
            return func.method
    
        module_name = getattr(func, "__module__", None) or ""
        type_name = getattr(type(func), "__name__", None) or ""
    
        # toolz.curry
        if "toolz" in module_name and "curry" == type_name:
            return func.func_name
        # multipledispatch objects
        if "multipledispatch" in module_name and "Dispatcher" == type_name:
            return func.name
        # numpy.vectorize objects
        if "numpy" in module_name and "vectorize" == type_name:
>           return "vectorize_" + func.pyfunc.__name__
E           AttributeError: 'functools.partial' object has no attribute '__name__'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions