Skip to content

Intermittent CI failure in test_cov #5910

@mrocklin

Description

@mrocklin

https://ci.appveyor.com/project/daskdev/dask/builds/30850098

__________________________________ test_cov ___________________________________
    def test_cov():
        x = np.arange(56).reshape((7, 8))
        d = da.from_array(x, chunks=(4, 4))
    
>       assert_eq(da.cov(d), np.cov(x))
dask\array\tests\test_routines.py:642: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
dask\array\routines.py:787: in cov
    X = X - X.mean(axis=1 - axis, keepdims=True)
dask\array\core.py:1985: in mean
    out=out,
dask\array\reductions.py:587: in mean
    dt = getattr(np.mean(np.empty(shape=(1,), dtype=a.dtype)), "dtype", object)
C:\Miniconda36-x64\envs\testenv\lib\site-packages\numpy\core\fromnumeric.py:3118: in mean
    out=out, **kwargs)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
a = array([nan]), axis = None, dtype = None, out = None, keepdims = False
    def _mean(a, axis=None, dtype=None, out=None, keepdims=False):
        arr = asanyarray(a)
    
        is_float16_result = False
        rcount = _count_reduce_items(arr, axis)
        # Make this warning show up first
        if rcount == 0:
            warnings.warn("Mean of empty slice.", RuntimeWarning, stacklevel=2)
    
        # Cast bool, unsigned int, and int to float64 by default
        if dtype is None:
            if issubclass(arr.dtype.type, (nt.integer, nt.bool_)):
                dtype = mu.dtype('f8')
            elif issubclass(arr.dtype.type, nt.float16):
                dtype = mu.dtype('f4')
                is_float16_result = True
    
>       ret = umr_sum(arr, axis, dtype, out, keepdims)
E       RuntimeWarning: invalid value encountered in reduce

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsUnit tests and/or continuous integration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions