home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 718869334

This data as json

id node_id number title user state locked assignee milestone comments created_at updated_at closed_at author_association active_lock_reason draft pull_request body reactions performed_via_github_app state_reason repo type
718869334 MDU6SXNzdWU3MTg4NjkzMzQ= 4502 dask dev upstream test failiures 10194086 closed 0     1 2020-10-11T16:12:13Z 2020-10-16T12:17:58Z 2020-10-16T12:17:57Z MEMBER      

Our upstream tests fail due to a change in dask. The likely culprit is dask/dask#6680 - dask.array.zeros_like does now take the meta keyword and thus it tries to coerce str to a bool which fails (and it didn't do before). The following should trigger the error:

```python import xarray as xr import dask

da = xr.DataArray(dask.array.array("")) xr.zeros_like(da, dtype=bool) `` Note thatzeros_likeis called inisnull` (which triggered the test failures):

https://github.com/pydata/xarray/blob/080caf4246fe2f4d6aa0c5dcb65a99b376fa669b/xarray/core/duck_array_ops.py#L100-L102

What happened:

```python /home/vsts/work/1/s/xarray/tests/test_duck_array_ops.py:499:


/home/vsts/work/1/s/xarray/testing.py:139: in compat_variable return a.dims == b.dims and (a._data is b._data or equiv(a.data, b.data)) /home/vsts/work/1/s/xarray/testing.py:36: in _data_allclose_or_equiv return duck_array_ops.array_equiv(arr1, arr2) /home/vsts/work/1/s/xarray/core/duck_array_ops.py:246: in array_equiv flag_array = (arr1 == arr2) | (isnull(arr1) & isnull(arr2)) /home/vsts/work/1/s/xarray/core/duck_array_ops.py:104: in isnull return zeros_like(data, dtype=bool) /home/vsts/work/1/s/xarray/core/duck_array_ops.py:56: in f return wrapped(args, *kwargs) /usr/share/miniconda/envs/xarray-tests/lib/python3.8/site-packages/dask/array/creation.py:174: in zeros_like return zeros( /usr/share/miniconda/envs/xarray-tests/lib/python3.8/site-packages/dask/array/wrap.py:78: in wrap_func_shape_as_first_arg return Array(dsk, name, chunks, dtype=dtype, meta=kwargs.get("meta", None)) /usr/share/miniconda/envs/xarray-tests/lib/python3.8/site-packages/dask/array/core.py:1083: in new meta = meta_from_array(meta, dtype=dtype)


x = array('', dtype='<U1'), ndim = 0, dtype = dtype('bool')

def meta_from_array(x, ndim=None, dtype=None):
    """Normalize an array to appropriate meta object

    Parameters
    ----------
    x: array-like, callable
        Either an object that looks sufficiently like a Numpy array,
        or a callable that accepts shape and dtype keywords

    if dtype and meta.dtype != dtype:
      meta = meta.astype(dtype)

E ValueError: invalid literal for int() with base 10: ''

```

{
    "url": "https://api.github.com/repos/pydata/xarray/issues/4502/reactions",
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  completed 13221727 issue

Links from other tables

  • 2 rows from issues_id in issues_labels
  • 1 row from issue in issue_comments
Powered by Datasette · Queries took 0.825ms · About: xarray-datasette