Skip to content

Precision issue in TestClipIntensityPercentiles3D #7797

Closed

Description

@KumoLiu
======================================================================
FAIL: test_soft_clipping_two_sided_0 (tests.test_clip_intensity_percentiles.TestClipIntensityPercentiles3D)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/parameterized/parameterized.py", line 620, in standalone_func
    return func(*(a + p.args), **p.kwargs, **kw)
  File "/tmp/tmp.NqmlxED7DG/tests/test_clip_intensity_percentiles.py", line 150, in test_soft_clipping_two_sided
    assert_allclose(result, p(expected), type_test="tensor", rtol=1e-4, atol=0)
  File "/tmp/tmp.NqmlxED7DG/tests/utils.py", line 135, in assert_allclose
    np.testing.assert_allclose(actual, desired, *args, **kwargs)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/numpy/testing/_private/utils.py", line 1592, in assert_allclose
    assert_array_compare(compare, actual, desired, err_msg=str(err_msg),
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/contextlib.py", line 75, in inner
    return func(*args, **kwds)
  File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/numpy/testing/_private/utils.py", line 862, in assert_array_compare
    raise AssertionError(msg)
AssertionError: 
Not equal to tolerance rtol=0.0001, atol=0

Mismatched elements: 245760 / 245760 (100%)
Max absolute difference: 0.00060272
Max relative difference: 0.00134147
 x: array([[[[[0.28405, 0.28405, 0.28405, ..., 0.28405, 0.28405, 0.28405],
          [0.28405, 0.28405, 0.28405, ..., 0.28405, 0.28405, 0.28405],
          [0.28405, 0.28405, 0.28405, ..., 0.28405, 0.28405, 0.28405],...
 y: array([[[[[0.2844, 0.2844, 0.2844, ..., 0.2844, 0.2844, 0.2844],
          [0.2844, 0.2844, 0.2844, ..., 0.2844, 0.2844, 0.2844],
          [0.2844, 0.2844, 0.2844, ..., 0.2844, 0.2844, 0.2844],...

----------------------------------------------------------------------

Activity

  1. added a commit that references this issue on May 27, 2024
    dcfeb59
  2. added a commit that references this issue on May 28, 2024
    762b525
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions