Skip to content

Commit 6a4a656

Browse files
committed
Fix test_grdfilter tests for GMT 6.2.0rc1
Min/max values of the grid now matches properly for xarray.DataArray and NetCDF inputs.
1 parent de43e47 commit 6a4a656

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pygmt/tests/test_grdfilter.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def fixture_grid():
2121
return load_earth_relief(registration="pixel")
2222

2323

24-
def test_grfilter_dataarray_in_dataarray_out(grid):
24+
def test_grdfilter_dataarray_in_dataarray_out(grid):
2525
"""
2626
grdfilter an input DataArray, and output as DataArray.
2727
"""
@@ -32,8 +32,8 @@ def test_grfilter_dataarray_in_dataarray_out(grid):
3232
assert result.coords["lat"].data.max() == 89.5
3333
assert result.coords["lon"].data.min() == -179.5
3434
assert result.coords["lon"].data.max() == 179.5
35-
npt.assert_almost_equal(result.data.min(), -6147.47265625, decimal=2)
36-
npt.assert_almost_equal(result.data.max(), 5164.1157, decimal=2)
35+
npt.assert_almost_equal(result.data.min(), -6147.4907, decimal=2)
36+
npt.assert_almost_equal(result.data.max(), 5164.06, decimal=2)
3737
assert result.sizes["lat"] == 180
3838
assert result.sizes["lon"] == 360
3939

@@ -47,11 +47,11 @@ def test_grdfilter_dataarray_in_file_out(grid):
4747
assert result is None # grdfilter returns None if output to a file
4848
result = grdinfo(tmpfile.name, per_column=True)
4949
assert (
50-
result == "-180 180 -90 90 -6147.47265625 5164.11572266 1 1 360 180 1 1\n"
50+
result == "-180 180 -90 90 -6147.49072266 5164.06005859 1 1 360 180 1 1\n"
5151
)
5252

5353

54-
def test_grfilter_file_in_dataarray_out():
54+
def test_grdfilter_file_in_dataarray_out():
5555
"""
5656
grdfilter an input grid file, and output as DataArray.
5757
"""

0 commit comments

Comments
 (0)