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

Standardize output types for grdhisteq methods #1812

Merged
merged 5 commits into from
Mar 14, 2022
Merged

Conversation

maxrjones
Copy link
Member

Description of proposed changes

This PR makes two updates to the recently added grdhisteq methods:

  1. Return an xarray.DataArray only if outgrid is None (xref Return xarray.DataArray if outgrid is None #1807)
  2. Update the docstring returns section for compute_bins to clarify the dependence on output_type.

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If wrapping a new module, open a 'Wrap new GMT module' issue and submit reasonably-sized PRs.
  • If adding new functionality, add an example to docstrings or tutorials.

Slash Commands

You can write slash commands (/command) in the first line of a comment to perform
specific operations. Supported slash commands are:

  • /format: automatically format and lint the code
  • /test-gmt-dev: run full tests on the latest GMT development version

@maxrjones maxrjones added bug Something isn't working documentation Improvements or additions to documentation skip-changelog Skip adding Pull Request to changelog labels Mar 13, 2022
pygmt/src/grdhisteq.py Show resolved Hide resolved
pygmt/src/grdhisteq.py Show resolved Hide resolved
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
@maxrjones maxrjones added the final review call This PR requires final review and approval from a second reviewer label Mar 13, 2022
This was referenced Mar 13, 2022
@seisman seisman added this to the 0.6.0 milestone Mar 14, 2022
pygmt/src/grdhisteq.py Outdated Show resolved Hide resolved
Copy link
Member

@seisman seisman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left a comment above, otherwise this PR looks good to me.

Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
@weiji14
Copy link
Member

weiji14 commented Mar 14, 2022

/format

pygmt/src/grdhisteq.py Outdated Show resolved Hide resolved
@weiji14 weiji14 merged commit 94681bd into main Mar 14, 2022
@weiji14 weiji14 deleted the grdhisteq-cleanup branch March 14, 2022 02:21
@maxrjones maxrjones removed the final review call This PR requires final review and approval from a second reviewer label Mar 14, 2022
sixy6e pushed a commit to sixy6e/pygmt that referenced this pull request Dec 21, 2022
)

Modifies grdhisteq methods, so that an `xarray.DataArray` is returned
only if outgrid is None. Also updated the docstring returns section for
compute_bins to clarify the dependence on output_type.

Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation skip-changelog Skip adding Pull Request to changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants