Skip to content

Commit 9902d2e

Browse files
committed
Merge branch 'main' into feature/clip
2 parents a4c89c7 + 977c16e commit 9902d2e

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

.github/workflows/ci_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ concurrency:
4949

5050
jobs:
5151
test:
52-
name: ${{ matrix.os }} - Python ${{ matrix.python-version }} / NumPy ${{ matrix.numpy-version }}
52+
name: ${{ matrix.os }} - Python ${{ matrix.python-version }}
5353
runs-on: ${{ matrix.os }}
5454
permissions:
5555
id-token: write # This is required for requesting OIDC token for codecov

pygmt/src/grdfill.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,13 +185,15 @@ def grdfill(
185185
Example
186186
-------
187187
Fill holes in a bathymetric grid with a constant value of 20.
188+
188189
>>> import pygmt
189190
>>> # Load a bathymetric grid with missing data
190191
>>> earth_relief_holes = pygmt.datasets.load_sample_data(name="earth_relief_holes")
191192
>>> # Fill the holes with a constant value of 20
192193
>>> filled_grid = pygmt.grdfill(grid=earth_relief_holes, constantfill=20)
193194
194195
Inquire the bounds of each hole.
196+
195197
>>> pygmt.grdfill(grid=earth_relief_holes, inquire=True)
196198
array([[1.83333333, 6.16666667, 3.83333333, 8.16666667],
197199
[6.16666667, 7.83333333, 0.5 , 2.5 ]])

pygmt/tests/test_sphinterpolate.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44

55
from pathlib import Path
66

7+
import numpy as np
78
import numpy.testing as npt
89
import pytest
10+
from packaging.version import Version
911
from pygmt import sphinterpolate
1012
from pygmt.datasets import load_sample_data
1113
from pygmt.enums import GridRegistration, GridType
@@ -42,4 +44,6 @@ def test_sphinterpolate_no_outgrid(mars):
4244
npt.assert_allclose(temp_grid.max(), 14628.144)
4345
npt.assert_allclose(temp_grid.min(), -6908.1987)
4446
npt.assert_allclose(temp_grid.median(), 118.96849)
45-
npt.assert_allclose(temp_grid.mean(), 272.60593)
47+
# TODO(NumPy>=2.3.0): Remove the numpy version check.
48+
mean = 272.60568 if Version(np.__version__) >= Version("2.3.0dev") else 272.60593
49+
npt.assert_allclose(temp_grid.mean(), mean)

0 commit comments

Comments
 (0)