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/418#issuecomment-454533545,https://api.github.com/repos/pydata/xarray/issues/418,454533545,MDEyOklzc3VlQ29tbWVudDQ1NDUzMzU0NQ==,5635139,2019-01-15T20:10:19Z,2019-01-15T20:10:19Z,MEMBER,"Closing as stale, please reopen if still relevant","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,84068169 https://github.com/pydata/xarray/issues/418#issuecomment-111943792,https://api.github.com/repos/pydata/xarray/issues/418,111943792,MDEyOklzc3VlQ29tbWVudDExMTk0Mzc5Mg==,10194086,2015-06-15T06:17:41Z,2015-06-15T06:17:41Z,MEMBER,"ok thank you for looking at it and the clarification. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,84068169 https://github.com/pydata/xarray/issues/418#issuecomment-111630149,https://api.github.com/repos/pydata/xarray/issues/418,111630149,MDEyOklzc3VlQ29tbWVudDExMTYzMDE0OQ==,1217238,2015-06-12T22:07:30Z,2015-06-12T22:09:16Z,MEMBER,"I just clarified this in the docs: http://xray.readthedocs.org/en/stable/indexing.html#nearest-neighbor-lookups Let me know if that makes sense -- hopefully it's clear now that you actually don't need `method='nearest'` most use cases. As for your hack, I'm reluctant to support `method='nearest'` with label based slicing without the upstream functionality in pandas -- which would need to go in `Index.slice_locs`/`Index.slice_indexer`: https://github.com/pydata/pandas/blob/be5ad4abcb9d8385110831edd138c1f644fe83ae/pandas/core/index.py#L2457 ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,84068169 https://github.com/pydata/xarray/issues/418#issuecomment-108119362,https://api.github.com/repos/pydata/xarray/issues/418,108119362,MDEyOklzc3VlQ29tbWVudDEwODExOTM2Mg==,1217238,2015-06-02T22:43:38Z,2015-06-02T22:43:38Z,MEMBER,"`ds.sel(lat=slice(30, 50))` will work to select all values inside interval `[30, 50]` already -- the values don't have to match exactly. This should probably be noted in the docs. This inconsistency is definitely a little annoying, though -- I don't see any harm in support nearest neighbor lookups for the bounds. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,84068169 https://github.com/pydata/xarray/issues/418#issuecomment-108014220,https://api.github.com/repos/pydata/xarray/issues/418,108014220,MDEyOklzc3VlQ29tbWVudDEwODAxNDIyMA==,10194086,2015-06-02T16:57:52Z,2015-06-02T16:58:52Z,MEMBER,"I did a short hack - not sure if it is of any help... #420 ``` import numpy as np import xray temp = 15 + 8 * np.random.randn(20) lat = np.arange(0, 20) ds = xray.Dataset({'temperature': ('lat', temp)}, coords={'lat' : lat}) ds.sel(lat=slice(1.2, 5.9)) # lat = 2 3 4 5 ds.sel(lat=slice(1.2, 5.9), method='nearest') # lat = 1 2 3 4 5 6 ``` ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,84068169