File tree Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Expand file tree Collapse file tree 1 file changed +5
-8
lines changed Original file line number Diff line number Diff line change 4
4
import os
5
5
6
6
import numpy .testing as npt
7
- from pygmt import grdinfo , sphinterpolate
7
+ from pygmt import sphinterpolate
8
8
from pygmt .helpers import GMTTempFile
9
9
10
10
@@ -28,10 +28,7 @@ def test_sphinterpolate_no_outgrid():
28
28
assert temp_grid .dims == ("lat" , "lon" )
29
29
assert temp_grid .gmt .gtype == 1 # Geographic grid
30
30
assert temp_grid .gmt .registration == 0 # Gridline registration
31
- result = grdinfo (grid = temp_grid , force_scan = "a" , per_column = "n" ).strip ().split ()
32
- assert int (result [0 ]) == 0 # x minimum
33
- assert int (result [1 ]) == 360 # x maximum
34
- assert int (result [2 ]) == - 90 # y minimum
35
- assert int (result [3 ]) == 90 # y maximum
36
- npt .assert_approx_equal (float (result [4 ]), - 6908.19873047 ) # v minimum
37
- npt .assert_approx_equal (float (result [5 ]), 14628.1435547 ) # v maximum
31
+ npt .assert_allclose (temp_grid .max (), 14628.144 )
32
+ npt .assert_allclose (temp_grid .min (), - 6908.1987 )
33
+ npt .assert_allclose (temp_grid .median (), 118.96849 )
34
+ npt .assert_allclose (temp_grid .mean (), 272.60593 )
You can’t perform that action at this time.
0 commit comments