-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a "drop" option to squeeze #242
Comments
Not sure if it's worth a separate feature request, but it'd be great to have a >>> ds
<xarray.Dataset>
Dimensions: (lat: 360, lon: 720, time: 2928)
Coordinates:
* lon (lon) float64 0.25 0.75 1.25 1.75 2.25 2.75 3.25 3.75 4.25 4.75 ...
* lat (lat) float64 -89.75 -89.25 -88.75 -88.25 -87.75 -87.25 -86.75 ...
* time (time) datetime64[ns] 2012-01-01 2012-01-01T03:00:00 ...
Data variables:
dswrf (time, lat, lon) float64 446.5 444.9 445.3 447.8 452.4 456.3 ...
>>> ds.isel(lat=0, lon=0, drop=True)
<xarray.Dataset>
Dimensions: (time: 2928)
Coordinates:
* time (time) datetime64[ns] 2012-01-01 2012-01-01T03:00:00 ...
Data variables:
dswrf (time) float64 446.5 444.9 445.3 447.8 452.4 456.3 ... This would be useful for making |
@naught101 Yes, I think that would be useful. |
Awesome, thanks shoyer! :) |
If True, squeezed dimensions should be dropped from the resulting object (instead of being retained as scalar)
The text was updated successfully, but these errors were encountered: