issues: 1940650207
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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1940650207 | I_kwDOAMm_X85zq_jf | 8300 | Inconsistent behaviour of xarray.concat | 40218891 | closed | 0 | 2 | 2023-10-12T19:23:32Z | 2023-10-12T19:48:01Z | 2023-10-12T19:48:00Z | NONE | What is your issue?I am not sure if it is a bug or a feature: ``` import numpy as np import pandas as pd import xarray as xr temp = 15 + 8 * np.random.randn(2, 2, 2)
lon = [[-99.83, -99.32], [-99.79, -99.23]]
lat = [[42.25, 42.21], [42.63, 42.59]]
ds = xr.Dataset(
{"temperature": (["x", "y", "time"], temp), "latitude_longitude": 0},
coords={
"lon": (["x", "y"], lon),
"lat": (["x", "y"], lat),
"time": ("time", pd.date_range("2014-09-05", periods=2)),
},
)
print(
xr.concat(
[ds.isel(time=0), ds.isel(time=1)], "time", data_vars="minimal"
).latitude_longitude
)
print(
xr.concat(
[ds.isel(time=slice(0, 1)), ds.isel(time=slice(1, 2))], "time", data_vars="minimal"
).latitude_longitude
)
``` BTW, this is xarray 2023.9.0. |
{
"url": "https://api.github.com/repos/pydata/xarray/issues/8300/reactions",
"total_count": 0,
"+1": 0,
"-1": 0,
"laugh": 0,
"hooray": 0,
"confused": 0,
"heart": 0,
"rocket": 0,
"eyes": 0
} |
completed | 13221727 | issue |