File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 44
55from pathlib import Path
66
7+ import numpy as np
78import numpy .testing as npt
89import pytest
10+ from packaging .version import Version
911from pygmt import sphinterpolate
1012from pygmt .datasets import load_sample_data
1113from 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 )
You can’t perform that action at this time.
0 commit comments