Skip to content

pygmt.grdfill: Add new parameter 'inquire' to inquire the bounds of holes #3880

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

Merged
merged 6 commits into from
Mar 29, 2025

Conversation

seisman
Copy link
Member

@seisman seisman commented Mar 27, 2025

Implement the idea in #3768 (comment).

Example

>>> import pygmt
>>> import numpy as np
>>> from pygmt.helpers.testing import load_static_earth_relief

>>> grid = load_static_earth_relief()
>>> # One hole
>>> grid[3:6, 3:5] = np.nan
>>> pygmt.grdfill(grid, inquire=True)
array([[-52., -50., -21., -18.]])

>>> # One more hole
>>> grid[7:9, 2:4] = np.nan
>>> pygmt.grdfill(grid, inquire=True)
array([[-53., -51., -17., -15.],
       [-52., -50., -21., -18.]])

@seisman seisman added the enhancement Improving an existing feature label Mar 27, 2025
@seisman seisman marked this pull request as ready for review March 27, 2025 17:09
@seisman seisman added the needs review This PR has higher priority and needs review. label Mar 27, 2025
@seisman
Copy link
Member Author

seisman commented Mar 27, 2025

I feel this PR is ready for review, and it would be good if we can make it into v0.15.0.

Co-authored-by: Michael Grund <[email protected]>
@seisman seisman added final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Mar 28, 2025
@seisman seisman added this to the 0.15.0 milestone Mar 28, 2025
@seisman seisman merged commit a11fc15 into main Mar 29, 2025
24 of 25 checks passed
@seisman seisman deleted the grdfill/L branch March 29, 2025 06:23
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Mar 29, 2025
seisman added a commit that referenced this pull request Mar 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants