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/32#issuecomment-36970906,https://api.github.com/repos/pydata/xarray/issues/32,36970906,MDEyOklzc3VlQ29tbWVudDM2OTcwOTA2,1217238,2014-03-07T06:15:36Z,2014-03-07T06:15:36Z,MEMBER,"Closing this issue since it was resolved by #34 (now merged into master).
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,28575097
https://github.com/pydata/xarray/issues/32#issuecomment-36469527,https://api.github.com/repos/pydata/xarray/issues/32,36469527,MDEyOklzc3VlQ29tbWVudDM2NDY5NTI3,1217238,2014-03-02T22:23:08Z,2014-03-03T02:23:19Z,MEMBER,"OK, I just added squeeze back in PR #34.
One change I made from in `indexed_by` from `views` is that it automatically squeezes out dimensions if you give an integer as the indexer. So `fcst.indexed_by(height_above_ground=0)` removes the `height_above_ground` dimension. If you wanted to keep that dimension with size 1, you would need to do `fcst.indexed_by(height_above_ground=slice(0, 1))` or `fcst.indexed_by(height_above_ground=[0])`. This behavior is more consistent with numpy, especially because I use `indexed_by` under the hood for indexing with DatasetArray objects.
Your suggestion for `__delitem__` is interesting but with the current implementation of `squeeze` (and `indexed_by` more generally) I'm not sure how to make it work, because we currently have to load a variable into memory as a numpy array to squeeze out a dimension. This means that deleting a variable could cause other variables to be loaded. My expectation (in general) is that deleting an item should only release resources, and do so in a fairly lightweight fashion.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,28575097
https://github.com/pydata/xarray/issues/32#issuecomment-36462034,https://api.github.com/repos/pydata/xarray/issues/32,36462034,MDEyOklzc3VlQ29tbWVudDM2NDYyMDM0,1217238,2014-03-02T18:37:38Z,2014-03-02T18:37:38Z,MEMBER,"I removed Dataset.squeeze because I've never actually had a use-case for `np.squeeze`. But it would be very easy to bring it back if you find it genuinely useful. The equivalent in the current version of xray would be
`fcst.indexed_by(height_above_ground=0)`, which would select out (a view) of the 0th element along the forecast dimension.
`__delitem__` is intended to remove a variable from a dataset but I have not tested it very carefully. Since every dimension is a variable, I think the right behavior would be to delete every variable that uses the dimension. So the later behavior you found is definitely not right! I'll see if I can put in a fix for that.
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,28575097