home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 706452192

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/pull/4499#issuecomment-706452192 https://api.github.com/repos/pydata/xarray/issues/4499 706452192 MDEyOklzc3VlQ29tbWVudDcwNjQ1MjE5Mg== 2448579 2020-10-10T00:16:57Z 2020-10-10T00:16:57Z MEMBER

Upstream dev failures look unrelated to this PR. Seems to be from dask's meta inference ``` python =================================== 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: ''

```

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  718468155
Powered by Datasette · Queries took 80.209ms · About: xarray-datasette