home / github / issues

Menu
  • Search all tables
  • GraphQL API

issues: 559645981

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
559645981 MDU6SXNzdWU1NTk2NDU5ODE= 3746 dataarray arithmetics restore removed coordinates in xarray 0.15 167802 closed 0     5 2020-02-04T11:06:40Z 2020-03-21T19:03:51Z 2020-03-21T19:03:51Z CONTRIBUTOR      

MCVE Code Sample

```python import xarray as xr import numpy as np arr2 = xr.DataArray(np.ones((2, 2)), dims=['y', 'x']) arr1 = xr.DataArray(np.ones((2, 2)), dims=['y', 'x'], coords={'y': [0, 1], 'x': [0, 1]})

del arr1.coords['y'] del arr1.coords['x']

shows arr1 without coordinates

arr1

shows coordinates in xarray 0.15

arr1 * arr2

```

Expected Output

python <xarray.DataArray (y: 2, x: 2)> array([[1., 1.], [1., 1.]]) Dimensions without coordinates: y, x

Problem Description

In xarray 0.15, the coordinates are restored when doing the multiplication: python <xarray.DataArray (y: 2, x: 2)> array([[1., 1.], [1., 1.]]) Coordinates: * y (y) int64 0 1 * x (x) int64 0 1

Output of xr.show_versions()

INSTALLED VERSIONS ------------------ commit: None python: 3.8.1 | packaged by conda-forge | (default, Jan 29 2020, 14:55:04) [GCC 7.3.0] python-bits: 64 OS: Linux OS-release: 4.18.0-147.0.3.el8_1.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: None LANG: en_GB.UTF-8 LOCALE: en_GB.UTF-8 libhdf5: 1.10.5 libnetcdf: 4.7.3 xarray: 0.15.0 pandas: 1.0.0 numpy: 1.18.1 scipy: 1.4.1 netCDF4: 1.5.3 pydap: None h5netcdf: 0.7.4 h5py: 2.10.0 Nio: None zarr: 2.3.2 cftime: 1.0.4.2 nc_time_axis: None PseudoNetCDF: None rasterio: 1.1.2 cfgrib: None iris: None bottleneck: 1.3.1 dask: 2.10.1 distributed: 2.10.0 matplotlib: 3.1.3 cartopy: 0.17.0 seaborn: None numbagg: None setuptools: 45.1.0.post20200119 pip: 20.0.2 conda: None pytest: 5.3.5 IPython: 7.12.0 sphinx: 2.3.1
{
    "url": "https://api.github.com/repos/pydata/xarray/issues/3746/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

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