Skip to content

Standardize output types for grdhisteq methods - #1812

Merged
weiji14 merged 5 commits into
mainfrom
grdhisteq-cleanup
Mar 14, 2022
Merged

weiji14 merged 5 commits into
mainfrom
grdhisteq-cleanup

Conversation

@maxrjones

Copy link
Copy Markdown
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
Comment thread pygmt/src/grdhisteq.py Resolved
Comment thread pygmt/src/grdhisteq.py Resolved
@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
Comment thread pygmt/src/grdhisteq.py Resolved

@seisman seisman left a comment •

Copy link
Copy Markdown
Member

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 <[email protected]>
@weiji14

weiji14 commented Mar 14, 2022

Copy link
Copy Markdown
Member

/format

Comment thread pygmt/src/grdhisteq.py 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 <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>

This branch was previously deployed

1 inactive deployment
Preview — 2b0a16da Deployed Mar 14, 2022 by vercel[bot]
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