We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
Dataset.mean drops coordinates, unlike DataArray.mean:
x = xarray.DataArray([2., 4.], coords={'a':[1., 2.], 'b': 3.}, dims=['a'], name='name') print 'DataArray mean:' print x.mean(dim='a') print 'Dataset mean:' print x.to_dataset().mean(dim='a')['name']
Output
DataArray mean <xarray.DataArray 'name' ()> array(3.0) Coordinates: b float64 3.0 Dataset mean <xarray.DataArray 'name' ()> array(3.0)
Thanks Ignacio
The text was updated successfully, but these errors were encountered:
Thanks for the report.
I'm marking this as a bug: I think we should probably keep the extra coordinates in both cases, but it should certainly be consistent.
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
Hi,
Dataset.mean drops coordinates, unlike DataArray.mean:
Output
Thanks
Ignacio
The text was updated successfully, but these errors were encountered: