Skip to content

Fix: Better first_point fix #613

Fix: Better first_point fix

Fix: Better first_point fix #613

GitHub Actions / JUnit Test Report failed Dec 5, 2023 in 0s

221 tests run, 220 passed, 0 skipped, 1 failed.

Annotations

Check failure on line 90 in tests/astrocyte/test_space_colonization.py

See this annotation in the file changed.

@github-actions github-actions / JUnit Test Report

test_space_colonization.test_repulsion

AssertionError: 
Not equal to tolerance rtol=1e-07, atol=0

Mismatched elements: 1 / 3 (33.3%)
Max absolute difference: 0.36787944
Max relative difference: 1.
 x: array([0., 0., 0.])
 y: array([0.      , 0.      , 0.367879])
Raw output
def test_repulsion():
        point = np.zeros(3)
    
        points = np.array([[0.0, 0.0, 1.0], [0.0, 0.0, 2.0], [0.0, 0.0, 3.0]])
    
        vectors = points - point
    
        result = tested._repulsion(points[:1], point, 1.0)
        expected = vectors[0] * np.exp(-1)
>       npt.assert_allclose(result, expected)

tests/astrocyte/test_space_colonization.py:90: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<function assert_allclose.<locals>.compare at 0x7f95b6ed80e0>, array([0., 0., 0.]), array([0.        , 0.        , 0.36787944]))
kwds = {'equal_nan': True, 'err_msg': '', 'header': 'Not equal to tolerance rtol=1e-07, atol=0', 'verbose': True}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
E           AssertionError: 
E           Not equal to tolerance rtol=1e-07, atol=0
E           
E           Mismatched elements: 1 / 3 (33.3%)
E           Max absolute difference: 0.36787944
E           Max relative difference: 1.
E            x: array([0., 0., 0.])
E            y: array([0.      , 0.      , 0.367879])

/opt/hostedtoolcache/Python/3.11.6/x64/lib/python3.11/contextlib.py:81: AssertionError