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 345426020,MDExOlB1bGxSZXF1ZXN0MjA0NTgxMDA1,2325,interp() now accepts date strings as desired co-ordinate locations,2448579,closed,0,,,3,2018-07-28T07:14:22Z,2018-07-30T00:33:13Z,2018-07-29T06:09:41Z,MEMBER,,0,pydata/xarray/pulls/2325," - [x] Closes #2284 - [x] Tests added (for all bug fixes or enhancements) - [x] Tests passed (for all non-documentation changes) - [x] Fully documented, including `whats-new.rst` for all changes and `api.rst` for new API (remove if this change should not be visible to users, e.g., if it is an internal clean-up, or if this is part of a larger project that will be documented later) ```python da = xr.DataArray([1, 5], dims=['time'], coords={'time': [np.datetime64('2014-05-06'), np.datetime64('2014-05-10')]}) da.interp(time='2014-05-07') ``` ``` array(2.) Coordinates: time datetime64[ns] 2014-05-07 ``` ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2325/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,,13221727,pull 345478817,MDU6SXNzdWUzNDU0Nzg4MTc=,2327,dimensions of interpolated output at single location depends on whether a scalar or list is provided,2448579,closed,0,,,2,2018-07-28T21:03:46Z,2018-07-28T22:48:28Z,2018-07-28T22:48:28Z,MEMBER,,,,"See below, in the first the output has no dimension but has a co-ordinate. #### Code Sample, a copy-pastable example if possible ```python da = xr.DataArray([1, 2, 3], dims='a', coords={'a': [1, 2, 3]}) da.interp(a=1.5) ``` ``` array(1.5) Coordinates: a float64 1.5 ``` while ```python da.interp(a=[1.5]) ``` ``` array([1.5]) Coordinates: * a (a) float64 1.5 ```` I think the latter should be the answer always. It's surprising to lose a dimension on interpolating... The fix should occur here, I think: https://github.com/pydata/xarray/blob/f281945fcacbfc1dbaa48fb15546fae5317bdda8/xarray/core/dataset.py#L1330 Changing that to `np.atleast_1d` breaks tests though :/ @fujiisoup ","{""url"": ""https://api.github.com/repos/pydata/xarray/issues/2327/reactions"", ""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,completed,13221727,issue