About the distinction between DataArray.nbytes and Dataset.nbytes
#9073
Unanswered
etienneschalk
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
About the distinction between
DataArray.nbytesandDataset.nbytesI have a question about the current
nbytesthat is represented, inherited from a distinction betweenDataArray.nbytesandDataset.nbytes:DataArray, only thenbytesof the data itself is taken into account (without coordinates)Dataset, all data variables and coordinates variables contribute to the size.Examples: First I build a DataArray where the coordinates (
float64) weigh more than the actual data (uint8). The top-levelSize: 3Bis shown. Then I place it into a Dataset. NowSize: 27Bis shown. This different way of counting is inherited from the direct usage of.nbytes. I find it a bit confusing because theDataArrayandDatasetcontain the same data, but presented differently.The documentation is clear about it:
But still, is there any reason for this variation? Why excluding coordinates for DataArrays and not for Datasets?
Thanks!
code examples below ⬇️
Beta Was this translation helpful? Give feedback.
All reactions