-
-
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
Pull xarray's nbytes from nbytes attribute on arrays #6797
Conversation
Please let me know if I should add a docstring as suggested in #6565 (comment). I didn't yet because most of the properties do not have docstrings. |
This would be great! Adding docstrings for the other properties would be a great (separate) PR! |
Thanks @maxrjones can you push any WIP tests you might have for this? |
If it's alright I will wait for #6804 to be merged first because that will greatly simplify testing the changes. After that PR, the following could be added to
|
Ah great idea! |
Great first contribution @maxrjones ! #6804 should auto-merge in a sec so you can then fetch and merge in |
Co-authored-by: Illviljan <[email protected]>
Thanks @maxrjones I added a sparse variable test that fails on main. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @maxrjones This is a great and impactful PR! Welcome to Xarray
This implements the suggestion in #4842 (comment) to leave the nbytes calculation to the backend array.
Also removed the duplicate docs entry reported in #6565
DataArray.nbytes
listed twice in API doc block #6565