issues: 1861738444
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1861738444 | I_kwDOAMm_X85u99_M | 8099 | inconsistent dimension propagation in `.interp()` with non-numeric types | 28786187 | open | 0 | 0 | 2023-08-22T15:46:13Z | 2023-08-22T15:55:44Z | CONTRIBUTOR | What happened?Hi, tried to find a similar issue, but haven't seen it. When interpolating a dataset containing non-numeric types using a DataArray for the new coordinates, then the dimensions of the interpolated data set differ from the case with only numeric types. Not sure this is clear enough, see the example. Edit: looks like nothing is interpolated at all in the non-numeric case. What did you expect to happen?The output dimensions should be the same in both cases and match the ones of the numeric-only case. Minimal Complete Verifiable Example```Python import xarray as xr import numpy as np ds = xr.Dataset( {"x": ("a", np.arange(4))}, coords={"a": (np.arange(4) - 1.5)}, ) t = xr.DataArray( np.random.randn(6).reshape((2, 3)) * 0.5, dims=["r", "s"], coords={"r": np.arange(2) - 0.5, "s": np.arange(3) - 1}, ) ds["m"] = ds.x > 1 different dimensions for
|
{ "url": "https://api.github.com/repos/pydata/xarray/issues/8099/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
13221727 | issue |