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/593#issuecomment-144274152,https://api.github.com/repos/pydata/xarray/issues/593,144274152,MDEyOklzc3VlQ29tbWVudDE0NDI3NDE1Mg==,2443309,2015-09-30T03:46:24Z,2015-09-30T03:46:24Z,MEMBER,"Okay then, I think it makes sense to re-raise as you originally suggested. I'll put together a PR tomorrow. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,108769226 https://github.com/pydata/xarray/issues/593#issuecomment-144270497,https://api.github.com/repos/pydata/xarray/issues/593,144270497,MDEyOklzc3VlQ29tbWVudDE0NDI3MDQ5Nw==,1217238,2015-09-30T03:18:15Z,2015-09-30T03:18:15Z,MEMBER,"I'm all behind that error message in principle, but it needs to be specific to the netcdf4 backend. For example, this works perfectly fine with scipy. Given these constraints, especially given that either of these arrays may be triggered lazily by a dask.array, I think this will be difficult to solve at all times when the expression is written. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,108769226 https://github.com/pydata/xarray/issues/593#issuecomment-144214269,https://api.github.com/repos/pydata/xarray/issues/593,144214269,MDEyOklzc3VlQ29tbWVudDE0NDIxNDI2OQ==,2443309,2015-09-29T22:54:13Z,2015-09-30T00:07:14Z,MEMBER,"I'm going to argue that it is better to raise an error at the time of offense. Currently we are failing silently, and yielding objects that are unusable. The logic I'm envisioning is like this: ``` Python if not issorted(indexer) and not self.loaded: raise IndexError('...') ``` ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,108769226 https://github.com/pydata/xarray/issues/593#issuecomment-144133156,https://api.github.com/repos/pydata/xarray/issues/593,144133156,MDEyOklzc3VlQ29tbWVudDE0NDEzMzE1Ng==,1217238,2015-09-29T17:46:04Z,2015-09-29T17:46:04Z,MEMBER,"My vote would be for catching and re-raising the error with a more informative message. Something like: ``` IndexError: the indexing operation you are attempting to perform is not valid on netCDF4.Variable object. Try loading your data into memory first by calling .load(). Original traceback: ... ``` This is automatic when you re-raise on Python 3. On Python 2, you'll have to use `traceback.format_exc()` to capture the traceback. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,108769226 https://github.com/pydata/xarray/issues/593#issuecomment-144098447,https://api.github.com/repos/pydata/xarray/issues/593,144098447,MDEyOklzc3VlQ29tbWVudDE0NDA5ODQ0Nw==,2443309,2015-09-29T15:43:36Z,2015-09-29T15:43:36Z,MEMBER,"That makes sense. I agree that this is ultimately a `netCDF4` limitation. So moving forward, we could one or more of the following: 1. Fix this in `netCDF4`, allowing unsorted integer arrays as indexers. 2. Check in `isel` that the indexer is valid when the data is still sitting on disk. Raise an `IndexError` in the cases that will fail later on. 3. Ugly: In cases where `isel` is provided with unsorted integer arrays, we could force the data to be loaded. 4. Uglier: Somehow store the integer array mapping in `xray`, using `netCDF4` as is, and returning a view after the data has been loaded. In my view, the current behavior of `isel` is failing silently and this is not what we want. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,108769226 https://github.com/pydata/xarray/issues/593#issuecomment-143914481,https://api.github.com/repos/pydata/xarray/issues/593,143914481,MDEyOklzc3VlQ29tbWVudDE0MzkxNDQ4MQ==,1217238,2015-09-29T01:01:39Z,2015-09-29T01:01:39Z,MEMBER,"We could work around this, but this is arguably a bug/limitation of netCDF4 Python, which no longer allows indexing with unsorted integer sequences. See https://github.com/Unidata/netcdf4-python/issues/300 and https://github.com/Unidata/netcdf4-python/pull/308. I think this could probably be fixed upstream somewhat straightforwardly by canonicalizing indexers as integer arrays instead of as boolean arrays. I'm not sure what we can do about it here. ","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,108769226