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 4
4
5
5
from pathlib import Path
6
6
7
+ import numpy as np
7
8
import numpy .testing as npt
8
9
import pytest
10
+ from packaging .version import Version
9
11
from pygmt import sphinterpolate
10
12
from pygmt .datasets import load_sample_data
11
13
from pygmt .enums import GridRegistration , GridType
@@ -42,4 +44,6 @@ def test_sphinterpolate_no_outgrid(mars):
42
44
npt .assert_allclose (temp_grid .max (), 14628.144 )
43
45
npt .assert_allclose (temp_grid .min (), - 6908.1987 )
44
46
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