home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 1094074423

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/1646#issuecomment-1094074423 https://api.github.com/repos/pydata/xarray/issues/1646 1094074423 IC_kwDOAMm_X85BNkA3 5635139 2022-04-09T16:00:29Z 2022-04-09T16:00:29Z MEMBER

One option here would be to take the name of the dataarray iff the dim name is dim_0. While I'm not a great fan of breaking that abstraction and hardcoding exceptions, it does solve the case quite well:

```python

In [7]: xr.concat([da,da], xr.DataArray(['x', 'y'], name='stat')) Out[7]: <xarray.DataArray 'air' (dim_0: 2, time: 2920, lat: 25, lon: 53)> array([[[[241.2 , 242.5 , 243.5 , ..., 232.79999, 235.5 , 238.59999], [243.79999, 244.5 , 244.7 , ..., 232.79999, 235.29999, 295.19 ], [297.69 , 298.09 , 298.09 , ..., 296.49 , 296.19 , 295.69 ]]]], dtype=float32) Coordinates: * lat (lat) float32 75.0 72.5 70.0 67.5 65.0 ... 25.0 22.5 20.0 17.5 15.0 * lon (lon) float32 200.0 202.5 205.0 207.5 ... 322.5 325.0 327.5 330.0 * time (time) datetime64[ns] 2013-01-01 ... 2014-12-31T18:00:00 * dim_0 (dim_0) <U1 'x' 'y' # Very unlikely we even want dim_0 here ```

It's very unlikely we even want dim_0 there rather than stat

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