Skip to content
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

Document array nature of Attribute values #67

Open
pp-mo opened this issue Mar 18, 2024 · 0 comments
Open

Document array nature of Attribute values #67

pp-mo opened this issue Mar 18, 2024 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@pp-mo
Copy link
Owner

pp-mo commented Mar 18, 2024

We don't really explain that all attribute values are converted to numpy arrays.
This is done by NcAttribute.__init__, and implicitly by NcData/NcVariable.set_attrval.
Meanwhile to fetch, "as_python_value()" is a key feature.

However, direct assignment to NcAttribute.value would bypass it.
It's not clear whether we would want to go further in forcing all attribute values to be arrays.
We could make .value a property, or possibly make NcAttribute itself immutable ??

@pp-mo pp-mo changed the title Document handling of Attributes Document array nature of Attribute values Mar 18, 2024
@pp-mo pp-mo added the documentation Improvements or additions to documentation label May 13, 2024
@pp-mo pp-mo mentioned this issue May 13, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant