issues: 609108666
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
609108666 | MDU6SXNzdWU2MDkxMDg2NjY= | 4016 | Concatenate DataArrays on one dim when another dim has difference sizes | 30388627 | closed | 0 | 8 | 2020-04-29T14:36:10Z | 2020-05-06T00:54:39Z | 2020-04-30T12:12:11Z | NONE | It's impossible to concatenate two arrays on same named dimensions with different sizes. MCVE Code Sample```python import xarray as xr import pandas as pd a = xr.DataArray([0], dims=['x']) b = xr.DataArray([1, 2, 3], dims=['x']) a = a.expand_dims("time") b = b.expand_dims("time") a.coords["time"] = pd.DatetimeIndex(['2020-02-14 05:25:10']) b.coords["time"] = pd.DatetimeIndex(['2020-02-14 05:25:10']) c = xr.concat([a, b], dim='time') print(c) ``` Expected Output
Problem Description
VersionsOutput of <tt>xr.show_versions()</tt>INSTALLED VERSIONS ------------------ commit: None python: 3.7.6 | packaged by conda-forge | (default, Jan 7 2020, 21:48:41) [MSC v.1916 64 bit (AMD64)] python-bits: 64 OS: Windows OS-release: 10 machine: AMD64 processor: Intel64 Family 6 Model 158 Stepping 9, GenuineIntel byteorder: little LC_ALL: None LANG: None LOCALE: None.None libhdf5: 1.10.5 libnetcdf: 4.7.3 xarray: 0.15.1 pandas: 1.0.3 numpy: 1.18.1 scipy: 1.4.1 netCDF4: 1.5.3 pydap: None h5netcdf: None h5py: 2.10.0 Nio: None zarr: 2.4.0 cftime: 1.1.1.2 nc_time_axis: None PseudoNetCDF: None rasterio: 1.1.3 cfgrib: None iris: None bottleneck: None dask: 2.10.1 distributed: 2.14.0 matplotlib: 3.2.1 cartopy: 0.17.0 seaborn: 0.10.0 numbagg: None setuptools: 46.1.3.post20200325 pip: 20.0.2 conda: None pytest: None IPython: 7.13.0 sphinx: 2.4.4 |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/4016/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |