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/1465#issuecomment-481887208,https://api.github.com/repos/pydata/xarray/issues/1465,481887208,MDEyOklzc3VlQ29tbWVudDQ4MTg4NzIwOA==,2448579,2019-04-10T22:16:34Z,2019-04-10T22:16:34Z,MEMBER,Closing in favour of #1613 which has more discussion.,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,238317455 https://github.com/pydata/xarray/issues/1465#issuecomment-311392162,https://api.github.com/repos/pydata/xarray/issues/1465,311392162,MDEyOklzc3VlQ29tbWVudDMxMTM5MjE2Mg==,11929622,2017-06-27T15:20:03Z,2017-06-27T15:20:03Z,NONE,"Definitely want to leave it up to you guys but agree that putting it in slice probably doesn't make sense. Adding something to `.sel()` would be a cool feature in the spirit of projects like Aospy, which try to minimize the amount code re-writing necessary for carrying out simple analysis on different datasets which are often organized in subtly different ways. Of course, it's pretty easy for users to implement this ourselves if we really need. Thanks for considering!","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,238317455 https://github.com/pydata/xarray/issues/1465#issuecomment-310884145,https://api.github.com/repos/pydata/xarray/issues/1465,310884145,MDEyOklzc3VlQ29tbWVudDMxMDg4NDE0NQ==,1217238,2017-06-25T05:45:30Z,2017-06-25T05:45:30Z,MEMBER,"I agree that this is somewhat surprising, but as @fmaussion points out this slicing behavior is consistent with pandas (and Python more generally, nothing that `range(5)[3:1]` is empty). `slice` is a Python built-in, so we can't adjust it. What we could potentially do is add a new keyboard argument to `.sel()` (or add a new indexing method entirely).","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,238317455 https://github.com/pydata/xarray/issues/1465#issuecomment-310855678,https://api.github.com/repos/pydata/xarray/issues/1465,310855678,MDEyOklzc3VlQ29tbWVudDMxMDg1NTY3OA==,11929622,2017-06-24T18:18:17Z,2017-06-24T18:18:17Z,NONE,"Definitely a fair point, but would it be possible to add an argument to either `slice` or `sel` (probably `slice`) which defaults to `False`? For example, `ds.sel(lon = slice(X0, X1, both_ways = True)` would implement this behavior, but `both_ways` defaults to False.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,238317455 https://github.com/pydata/xarray/issues/1465#issuecomment-310855401,https://api.github.com/repos/pydata/xarray/issues/1465,310855401,MDEyOklzc3VlQ29tbWVudDMxMDg1NTQwMQ==,10050469,2017-06-24T18:15:16Z,2017-06-24T18:15:16Z,MEMBER,"While it seems a good idea at first (I've fallen into this as well), I'm not sure this would be a good idea. Look at pandas for example: ```python In [1]: import pandas as pd In [2]: ts = pd.Series([1, 2, 3, 4,]) In [3]: ts[1:3] Out[3]: 1 2 2 3 dtype: int64 In [4]: ts[3:1] Out[4]: Series([], dtype: int64) ``` I don't think one would like the last statement to return something else than an empty series.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,238317455