Skip to content

Remove deprecated allow_lazy #4499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 11, 2020
Merged

Conversation

dcherian
Copy link
Contributor

@dcherian dcherian commented Oct 9, 2020

No description provided.

@dcherian
Copy link
Contributor Author

Upstream dev failures look unrelated to this PR. Seems to be from dask's meta inference

=================================== FAILURES ===================================
________________ test_argmin_max[x-False-min-True-False-str-1] _________________

dim_num = 1, dtype = <class 'str'>, contains_nan = False, dask = True
func = 'min', skipna = False, aggdim = 'x'

    @pytest.mark.parametrize("dim_num", [1, 2])
    @pytest.mark.parametrize("dtype", [float, int, np.float32, np.bool_, str])
    @pytest.mark.parametrize("contains_nan", [True, False])
    @pytest.mark.parametrize("dask", [False, True])
    @pytest.mark.parametrize("func", ["min", "max"])
    @pytest.mark.parametrize("skipna", [False, True])
    @pytest.mark.parametrize("aggdim", ["x", "y"])
    def test_argmin_max(dim_num, dtype, contains_nan, dask, func, skipna, aggdim):
        # pandas-dev/pandas#16830, we do not check consistency with pandas but
        # just make sure da[da.argmin()] == da.min()
    
        if aggdim == "y" and dim_num < 2:
            pytest.skip("dim not in this test")
    
        if dask and not has_dask:
            pytest.skip("requires dask")
    
        if contains_nan:
            if not skipna:
                pytest.skip(
                    "numpy's argmin (not nanargmin) does not handle " "object-dtype"
                )
            if skipna and np.dtype(dtype).kind in "iufc":
                pytest.skip("numpy's nanargmin raises ValueError for all nan axis")
        da = construct_dataarray(dim_num, dtype, contains_nan=contains_nan, dask=dask)
    
        with warnings.catch_warnings():
            warnings.filterwarnings("ignore", "All-NaN slice")
    
            actual = da.isel(
                **{aggdim: getattr(da, "arg" + func)(dim=aggdim, skipna=skipna).compute()}
            )
            expected = getattr(da, func)(dim=aggdim, skipna=skipna)
>           assert_allclose(
    
        if dtype and meta.dtype != dtype:
>           meta = meta.astype(dtype)
E           ValueError: invalid literal for int() with base 10: ''

@mathause
Copy link
Collaborator

Yes I think the failures are unrelated (#4502)

@dcherian dcherian merged commit 2f96fad into pydata:master Oct 11, 2020
@dcherian dcherian deleted the remove-allow-lazy branch October 11, 2020 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants