Skip to content

Commit

Permalink
Removes redundant precision specifier
Browse files Browse the repository at this point in the history
  • Loading branch information
MoseleyS committed Jul 29, 2024
1 parent a58712e commit 1aa4a32
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@ def test_data(projected, circular, regrid, example_x, example_y, data=INPUT_DATA
)
expected_x = example_x.copy()
expected_y = example_y.copy()
x_precision = 1e-7 if circular and regrid else 1e-7
if circular:
cube.coord(axis="x").circular = True
elif not regrid: # Drop final column
Expand All @@ -99,7 +98,7 @@ def test_data(projected, circular, regrid, example_x, example_y, data=INPUT_DATA
expected_y /= 10 * DISTANCE_PER_DEGREE_AT_EQUATOR / EQUAL_AREA_GRID_SPACING
plugin = GradientBetweenAdjacentGridSquares(regrid=regrid)
result_x, result_y = plugin(cube)
assert np.allclose(expected_x, result_x.data, rtol=x_precision)
assert np.allclose(expected_x, result_x.data)
assert np.allclose(expected_y, result_y.data)


Expand Down

0 comments on commit 1aa4a32

Please sign in to comment.