-
Notifications
You must be signed in to change notification settings - Fork 228
GMTDataArrayAccessor: Improve the documentation to clarify how the accessor works #3955
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
base: main
Are you sure you want to change the base?
Conversation
:class:`xarray.DataArray` instance. Thus, the *gmt* accessor will be re-initialized | ||
in cases where the :class:`xarray.DataArray` is manipulated (e.g., arithmetic and | ||
slice operations) or when accessing a :class:`xarray.DataArray` from a |
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.
"Slice"-ing is still mentioned here?
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.
Yes, slice operation creates a new xarray.DataArray instance, so the gmt accessor is re-initialized. The registration and gtype information are correct if the source encoding exists (e.g., loaded via xr.load_dataarray
) or incorrect if the source encoding is None (e.g., xr.DataArray
created from scracth).
plotting functions. Refer to :class:`pygmt.GMTDataArrayAccessor` for detailed | ||
explanations and workarounds. | ||
:class:`xarray.DataArray` grid can be accessed via the *gmt* accessor. Refer to | ||
:class:`pygmt.GMTDataArrayAccessor` for detailed explanations and limitations. |
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.
I've also simplified the notes in the load_xxx functions. Please review it and then I'll apply the changes to other load_xxx functions after approval.
Edit: I've updated all files.
Closes #524.
Preview: