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/3252#issuecomment-583083189,https://api.github.com/repos/pydata/xarray/issues/3252,583083189,MDEyOklzc3VlQ29tbWVudDU4MzA4MzE4OQ==,81219,2020-02-06T19:59:29Z,2020-02-06T21:21:26Z,CONTRIBUTOR,"@shoyer I'm having trouble wrapping my head around this. The example above is essentially a 1D interpolation over `y`, a coordinate selection over `x`, and a broadcast over `z`. I don't think it should interpolate over x, right ? ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,484622545 https://github.com/pydata/xarray/issues/3252#issuecomment-582945608,https://api.github.com/repos/pydata/xarray/issues/3252,582945608,MDEyOklzc3VlQ29tbWVudDU4Mjk0NTYwOA==,81219,2020-02-06T15:00:57Z,2020-02-06T15:00:57Z,CONTRIBUTOR,"Just got bit by this as well. Computing monthly quantile correction factors, so I have an array with dimensions (month, quantile, lon, lat). I then want to apply these correction factors to a time series (time, lon, lat), so I compute the month and quantile of my time series, and want to `interp` into the quantile correction factors. This doesn't work because both the factors and the time series have (lat, lon) dimensions. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,484622545 https://github.com/pydata/xarray/issues/3252#issuecomment-524579537,https://api.github.com/repos/pydata/xarray/issues/3252,524579537,MDEyOklzc3VlQ29tbWVudDUyNDU3OTUzNw==,1386642,2019-08-24T20:54:02Z,2019-08-24T20:54:02Z,CONTRIBUTOR,Ok. I realized this problem occurs only because `x` was a dimension of the new index `idx` and the original dataset. Perhaps `sel` should warn the user or raise an error when this happens.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,484622545 https://github.com/pydata/xarray/issues/3252#issuecomment-524578659,https://api.github.com/repos/pydata/xarray/issues/3252,524578659,MDEyOklzc3VlQ29tbWVudDUyNDU3ODY1OQ==,1386642,2019-08-24T20:35:45Z,2019-08-24T20:36:30Z,CONTRIBUTOR,"Ok. I started playing around with this, but I am getting errors when indexing arrays with ND variables. `data.sel(x=nd_x)` works, but any subsequent operations complain that `IndexVariable objects must be 1-dimensional`: ``` >>> import xarray as xr >>> import numpy as np >>> npdata = np.tile(np.arange(10), (5, 1)) ... data = xr.DataArray(npdata, dims=['y', 'x'], ... coords={'x': np.r_[:10], 'y': np.r_[:5]}) ... idx = xr.DataArray(npdata, dims=['z', 'x']) ... ... ans = data.sel(x=idx, method='bfill') ... assert set(ans.dims) == {'z', 'y', 'x'} ... print(ans) Traceback (most recent call last): File """", line 8, in print(ans) File ""/Users/noah/workspace/software/xarray/xarray/core/common.py"", line 129, in __repr__ return formatting.array_repr(self) File ""/Users/noah/workspace/software/xarray/xarray/core/formatting.py"", line 463, in array_repr summary.append(repr(arr.coords)) File ""/Users/noah/workspace/software/xarray/xarray/core/coordinates.py"", line 78, in __repr__ return formatting.coords_repr(self) File ""/Users/noah/workspace/software/xarray/xarray/core/formatting.py"", line 381, in coords_repr coords, title=""Coordinates"", summarizer=summarize_coord, col_width=col_width File ""/Users/noah/workspace/software/xarray/xarray/core/formatting.py"", line 361, in _mapping_repr summary += [summarizer(k, v, col_width) for k, v in mapping.items()] File ""/Users/noah/workspace/software/xarray/xarray/core/formatting.py"", line 361, in summary += [summarizer(k, v, col_width) for k, v in mapping.items()] File ""/Users/noah/workspace/software/xarray/xarray/core/formatting.py"", line 307, in summarize_coord coord = var.variable.to_index_variable() File ""/Users/noah/workspace/software/xarray/xarray/core/variable.py"", line 440, in to_index_variable self.dims, self._data, self._attrs, encoding=self._encoding, fastpath=True File ""/Users/noah/workspace/software/xarray/xarray/core/variable.py"", line 1943, in __init__ raise ValueError(""%s objects must be 1-dimensional"" % type(self).__name__) ValueError: IndexVariable objects must be 1-dimensional ``` ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,484622545 https://github.com/pydata/xarray/issues/3252#issuecomment-524570552,https://api.github.com/repos/pydata/xarray/issues/3252,524570552,MDEyOklzc3VlQ29tbWVudDUyNDU3MDU1Mg==,1386642,2019-08-24T18:13:10Z,2019-08-24T18:13:10Z,CONTRIBUTOR,So when would `interp` use this manual interpolation method? Would it try it only if scipy fails or check the dimensions?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,484622545 https://github.com/pydata/xarray/issues/3252#issuecomment-524515190,https://api.github.com/repos/pydata/xarray/issues/3252,524515190,MDEyOklzc3VlQ29tbWVudDUyNDUxNTE5MA==,1386642,2019-08-24T03:40:32Z,2019-08-24T03:40:32Z,CONTRIBUTOR,"After reading the `method='ffill'` docs, I agree with you. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,484622545 https://github.com/pydata/xarray/issues/3252#issuecomment-524448135,https://api.github.com/repos/pydata/xarray/issues/3252,524448135,MDEyOklzc3VlQ29tbWVudDUyNDQ0ODEzNQ==,1386642,2019-08-23T20:17:06Z,2019-08-23T20:17:06Z,CONTRIBUTOR,"In my experience, computing `w` efficiently is the tricky part. The function is slightly different, but [metpy](https://unidata.github.io/MetPy/latest/api/generated/metpy.interpolate.interpolate_1d.html) uses a lot of tricks to make this work efficiently. A manual for-loop is much cleaner for this kind of stencil calculation IMO. What kind of duck arrays were you thinking of?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,484622545 https://github.com/pydata/xarray/issues/3252#issuecomment-524424788,https://api.github.com/repos/pydata/xarray/issues/3252,524424788,MDEyOklzc3VlQ29tbWVudDUyNDQyNDc4OA==,1386642,2019-08-23T18:53:26Z,2019-08-23T18:53:26Z,CONTRIBUTOR,I have some numba code which does this for linear interpolation. Does `scipy` support this pattern?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,484622545