issue_comments: 610715885
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/issues/3954#issuecomment-610715885 | https://api.github.com/repos/pydata/xarray/issues/3954 | 610715885 | MDEyOklzc3VlQ29tbWVudDYxMDcxNTg4NQ== | 34353851 | 2020-04-08T02:25:34Z | 2020-04-08T02:25:34Z | NONE | import xarray as xr import numpy as np x = 2 y = 4 z = 3 data = np.arange(xyz).reshape(z, x, y) 3d array with coordsa = xr.DataArray(data, dims=['z', 'y', 'x'], coords={'z': np.arange(z)}) 2d array without coordsb = xr.DataArray(np.arange(xy).reshape(x, y)1.5, dims=['y', 'x']) expand 2d to 3db = b.assign_coords({'z':3}) comb = xr.concat([a, b], dim='z') perhaps you need another thing. http://xarray.pydata.org/en/stable/generated/xarray.concat.html ** consist of variables and coordinates with matching shapes if you compare your shape are differents a.shape and b.shape Regards. Javier Ruano. El mié., 8 abr. 2020 a las 1:36, Xin Zhang (notifications@github.com) escribió:
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
596249070 |