Skip to content

Commit

Permalink
use almost equal tests (#4349)
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau committed Apr 2, 2024
1 parent 1d9f28f commit 446c0ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nilearn/surface/tests/test_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -678,10 +678,10 @@ def test_sampling_affine(affine_eye):
affine[-1, -1] = 1
texture = surface._nearest_voxel_sampling(
[img], mesh, affine=affine, radius=1, kind='ball')
assert_array_equal(texture[0], [1., 2., 1.])
assert_array_almost_equal(texture[0], [1.0, 2.0, 1.0], decimal=15)
texture = surface._interpolation_sampling(
[img], mesh, affine=affine, radius=0, kind='ball')
assert_array_almost_equal(texture[0], [1.1, 2., 1.])
assert_array_almost_equal(texture[0], [1.1, 2.0, 1.0], decimal=15)


@pytest.mark.parametrize("kind", ["auto", "line", "ball"])
Expand Down

0 comments on commit 446c0ac

Please sign in to comment.