Skip to content

non-deterministic CI error: test_basic_ops.py::TestBasicOps::test_exp[ThrustRTC-data2] #1765

@slayoo

Description

@slayoo
    @staticmethod
    @pytest.mark.parametrize(
        "data",
        (
            [1.0],
            [2.0, 3, 4],
            [-1, np.nan, np.inf],
        ),
    )
    def test_exp(backend_class, data):
        # Arrange
        backend = backend_class(double_precision=True)
        output = backend.Storage.from_ndarray(np.asarray(data))
    
        # Act
        output.exp()
    
        # Assert
>       np.testing.assert_array_equal(output.to_ndarray(), np.exp(data))

tests/unit_tests/backends/storage/test_basic_ops.py:46: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

args = (<built-in function eq>, array([0.36787944,        nan,        inf]), array([0.36787944,        nan,        inf]))
kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}

    @wraps(func)
    def inner(*args, **kwds):
        with self._recreate_cm():
>           return func(*args, **kwds)
                   ^^^^^^^^^^^^^^^^^^^
E           AssertionError: 
E           Arrays are not equal
E           
E           Mismatched elements: 1 / 3 (33.3%)
E           Max absolute difference: 5.55111512e-17
E           Max relative difference: 1.50894954e-16
E            x: array([0.367879,      nan,      inf])
E            y: array([0.367879,      nan,      inf])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions