-
Notifications
You must be signed in to change notification settings - Fork 224
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
Add inline example for grdclip #1711
Conversation
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.
What do you think about adding a couple lines to report the range of data values (suggestions below)? This might help people understand the impact on the data and would be essential if we ever want to include these in the tests.
I'm not a big fan of using pseudo-print statements to show the effect of the |
I think this way of displaying the output to show and test results in docstring examples is really common for scientific Python libraries e.g., geopandas.DataFrame.clip - docstring source and pandas.DataFrame.clip - dostring source. |
I agree with @meghanrjones |
@seisman @meghanrjones Sounds good! |
Co-authored-by: Meghan Jones <[email protected]>
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.
Great, thanks!
Example to create a new grid from an input grid using pygmt.grdclip. Shows how users can set values that are above/below a given value to a new value. Co-authored-by: Meghan Jones <[email protected]>
This PR adds an inline example for
grdclip
.Addresses: #1686
Fixes #
Reminders
make format
andmake check
to make sure the code follows the style guide.doc/api/index.rst
.Slash Commands
You can write slash commands (
/command
) in the first line of a comment to performspecific operations. Supported slash commands are:
/format
: automatically format and lint the code/test-gmt-dev
: run full tests on the latest GMT development version