Closed
Description
Describe the issue:
A CI run is being created for musllinux in #22864. This has uncovered several test fails. One of these are the parameterised tests for numpy.core.tests.test_umath.TestFRExp
Reproduce the code example:
NA
Error message:
2023-01-19T14:03:09.1683253Z __________________________ TestFRExp.test_frexp[f--4] __________________________
2023-01-19T14:03:09.1683423Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed2d0>
2023-01-19T14:03:09.1683544Z dtype = 'f', stride = -4
2023-01-19T14:03:09.1683551Z
2023-01-19T14:03:09.1683752Z @pytest.mark.parametrize("stride", [-4,-2,-1,1,2,4])
2023-01-19T14:03:09.1683927Z @pytest.mark.parametrize("dtype", ['f', 'd'])
2023-01-19T14:03:09.1684183Z @pytest.mark.skipif(not sys.platform.startswith('linux'),
2023-01-19T14:03:09.1684360Z reason="np.frexp gives different answers for NAN/INF on windows and linux")
2023-01-19T14:03:09.1684468Z def test_frexp(self, dtype, stride):
2023-01-19T14:03:09.1684706Z arr = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 1.0, -1.0], dtype=dtype)
2023-01-19T14:03:09.1684961Z mant_true = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 0.5, -0.5], dtype=dtype)
2023-01-19T14:03:09.1685149Z exp_true = np.array([0, 0, 0, 0, 0, 0, 1, 1], dtype='i')
2023-01-19T14:03:09.1685255Z out_mant = np.ones(8, dtype=dtype)
2023-01-19T14:03:09.1685406Z out_exp = 2*np.ones(8, dtype='i')
2023-01-19T14:03:09.1685574Z mant, exp = np.frexp(arr[::stride], out=(out_mant[::stride], out_exp[::stride]))
2023-01-19T14:03:09.1685689Z assert_equal(mant_true[::stride], mant)
2023-01-19T14:03:09.1685808Z > assert_equal(exp_true[::stride], exp)
2023-01-19T14:03:09.1685816Z
2023-01-19T14:03:09.1686027Z arr = array([ nan, nan, inf, -inf, 0., -0., 1., -1.], dtype=float32)
2023-01-19T14:03:09.1686130Z dtype = 'f'
2023-01-19T14:03:09.1686225Z exp = array([1, 2], dtype=int32)
2023-01-19T14:03:09.1686341Z exp_true = array([0, 0, 0, 0, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.1686502Z mant = array([-0.5, -inf], dtype=float32)
2023-01-19T14:03:09.1686722Z mant_true = array([ nan, nan, inf, -inf, 0. , -0. , 0.5, -0.5], dtype=float32)
2023-01-19T14:03:09.1686836Z out_exp = array([2, 2, 2, 2, 2, 2, 2, 1], dtype=int32)
2023-01-19T14:03:09.1687046Z out_mant = array([ 1. , 1. , 1. , -inf, 1. , 1. , 1. , -0.5], dtype=float32)
2023-01-19T14:03:09.1687213Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed2d0>
2023-01-19T14:03:09.1687307Z stride = -4
2023-01-19T14:03:09.1687314Z
2023-01-19T14:03:09.1687416Z numpy/core/tests/test_umath.py:1760:
2023-01-19T14:03:09.1687527Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2023-01-19T14:03:09.1687534Z
2023-01-19T14:03:09.1687773Z args = (<built-in function eq>, array([1, 0], dtype=int32), array([1, 2], dtype=int32))
2023-01-19T14:03:09.1688018Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.1688026Z
2023-01-19T14:03:09.1688098Z @wraps(func)
2023-01-19T14:03:09.1688229Z def inner(*args, **kwds):
2023-01-19T14:03:09.1688315Z with self._recreate_cm():
2023-01-19T14:03:09.1688408Z > return func(*args, **kwds)
2023-01-19T14:03:09.1688499Z E AssertionError:
2023-01-19T14:03:09.1688587Z E Arrays are not equal
2023-01-19T14:03:09.1688654Z E
2023-01-19T14:03:09.1688762Z E Mismatched elements: 1 / 2 (50%)
2023-01-19T14:03:09.1688860Z E Max absolute difference: 2
2023-01-19T14:03:09.1688951Z E Max relative difference: 1.
2023-01-19T14:03:09.1689054Z E x: array([1, 0], dtype=int32)
2023-01-19T14:03:09.1689150Z E y: array([1, 2], dtype=int32)
2023-01-19T14:03:09.1689158Z
2023-01-19T14:03:09.1689403Z args = (<built-in function eq>, array([1, 0], dtype=int32), array([1, 2], dtype=int32))
2023-01-19T14:03:09.1689545Z func = <function assert_array_compare at 0x7fb7422d4e50>
2023-01-19T14:03:09.1689801Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.1689965Z self = <contextlib._GeneratorContextManager object at 0x7fb7426404c0>
2023-01-19T14:03:09.1689972Z
2023-01-19T14:03:09.1690215Z /opt/_internal/cpython-3.10.9/lib/python3.10/contextlib.py:79: AssertionError
2023-01-19T14:03:09.1690411Z __________________________ TestFRExp.test_frexp[f--2] __________________________
2023-01-19T14:03:09.1690428Z
2023-01-19T14:03:09.1690580Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed360>
2023-01-19T14:03:09.1690769Z dtype = 'f', stride = -2
2023-01-19T14:03:09.1690776Z
2023-01-19T14:03:09.1690969Z @pytest.mark.parametrize("stride", [-4,-2,-1,1,2,4])
2023-01-19T14:03:09.1691145Z @pytest.mark.parametrize("dtype", ['f', 'd'])
2023-01-19T14:03:09.1691353Z @pytest.mark.skipif(not sys.platform.startswith('linux'),
2023-01-19T14:03:09.1691529Z reason="np.frexp gives different answers for NAN/INF on windows and linux")
2023-01-19T14:03:09.1691642Z def test_frexp(self, dtype, stride):
2023-01-19T14:03:09.1691885Z arr = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 1.0, -1.0], dtype=dtype)
2023-01-19T14:03:09.1692133Z mant_true = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 0.5, -0.5], dtype=dtype)
2023-01-19T14:03:09.1692319Z exp_true = np.array([0, 0, 0, 0, 0, 0, 1, 1], dtype='i')
2023-01-19T14:03:09.1692426Z out_mant = np.ones(8, dtype=dtype)
2023-01-19T14:03:09.1692576Z out_exp = 2*np.ones(8, dtype='i')
2023-01-19T14:03:09.1692742Z mant, exp = np.frexp(arr[::stride], out=(out_mant[::stride], out_exp[::stride]))
2023-01-19T14:03:09.1692858Z assert_equal(mant_true[::stride], mant)
2023-01-19T14:03:09.1692973Z > assert_equal(exp_true[::stride], exp)
2023-01-19T14:03:09.1692980Z
2023-01-19T14:03:09.1693199Z arr = array([ nan, nan, inf, -inf, 0., -0., 1., -1.], dtype=float32)
2023-01-19T14:03:09.1693295Z dtype = 'f'
2023-01-19T14:03:09.1693402Z exp = array([1, 0, 2, 2], dtype=int32)
2023-01-19T14:03:09.1693517Z exp_true = array([0, 0, 0, 0, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.1693701Z mant = array([-0.5, -0. , -inf, nan], dtype=float32)
2023-01-19T14:03:09.1693922Z mant_true = array([ nan, nan, inf, -inf, 0. , -0. , 0.5, -0.5], dtype=float32)
2023-01-19T14:03:09.1694035Z out_exp = array([2, 2, 2, 2, 2, 0, 2, 1], dtype=int32)
2023-01-19T14:03:09.1694247Z out_mant = array([ 1. , nan, 1. , -inf, 1. , -0. , 1. , -0.5], dtype=float32)
2023-01-19T14:03:09.1694411Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed360>
2023-01-19T14:03:09.1694501Z stride = -2
2023-01-19T14:03:09.1694508Z
2023-01-19T14:03:09.1694612Z numpy/core/tests/test_umath.py:1760:
2023-01-19T14:03:09.1694721Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2023-01-19T14:03:09.1694727Z
2023-01-19T14:03:09.1694980Z args = (<built-in function eq>, array([1, 0, 0, 0], dtype=int32), array([1, 0, 2, 2], dtype=int32))
2023-01-19T14:03:09.1695272Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.1695280Z
2023-01-19T14:03:09.1695354Z @wraps(func)
2023-01-19T14:03:09.1695442Z def inner(*args, **kwds):
2023-01-19T14:03:09.1695535Z with self._recreate_cm():
2023-01-19T14:03:09.1695620Z > return func(*args, **kwds)
2023-01-19T14:03:09.1695708Z E AssertionError:
2023-01-19T14:03:09.1695800Z E Arrays are not equal
2023-01-19T14:03:09.1695868Z E
2023-01-19T14:03:09.1695975Z E Mismatched elements: 2 / 4 (50%)
2023-01-19T14:03:09.1696071Z E Max absolute difference: 2
2023-01-19T14:03:09.1696167Z E Max relative difference: 1.
2023-01-19T14:03:09.1696264Z E x: array([1, 0, 0, 0], dtype=int32)
2023-01-19T14:03:09.1696357Z E y: array([1, 0, 2, 2], dtype=int32)
2023-01-19T14:03:09.1696364Z
2023-01-19T14:03:09.1696626Z args = (<built-in function eq>, array([1, 0, 0, 0], dtype=int32), array([1, 0, 2, 2], dtype=int32))
2023-01-19T14:03:09.1696765Z func = <function assert_array_compare at 0x7fb7422d4e50>
2023-01-19T14:03:09.1697012Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.1697176Z self = <contextlib._GeneratorContextManager object at 0x7fb7426404c0>
2023-01-19T14:03:09.1697182Z
2023-01-19T14:03:09.1697427Z /opt/_internal/cpython-3.10.9/lib/python3.10/contextlib.py:79: AssertionError
2023-01-19T14:03:09.1697679Z __________________________ TestFRExp.test_frexp[f--1] __________________________
2023-01-19T14:03:09.1697685Z
2023-01-19T14:03:09.1697838Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed3f0>
2023-01-19T14:03:09.1697959Z dtype = 'f', stride = -1
2023-01-19T14:03:09.1697965Z
2023-01-19T14:03:09.1698156Z @pytest.mark.parametrize("stride", [-4,-2,-1,1,2,4])
2023-01-19T14:03:09.1698333Z @pytest.mark.parametrize("dtype", ['f', 'd'])
2023-01-19T14:03:09.1698548Z @pytest.mark.skipif(not sys.platform.startswith('linux'),
2023-01-19T14:03:09.1698719Z reason="np.frexp gives different answers for NAN/INF on windows and linux")
2023-01-19T14:03:09.1698825Z def test_frexp(self, dtype, stride):
2023-01-19T14:03:09.1699069Z arr = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 1.0, -1.0], dtype=dtype)
2023-01-19T14:03:09.1699310Z mant_true = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 0.5, -0.5], dtype=dtype)
2023-01-19T14:03:09.1699500Z exp_true = np.array([0, 0, 0, 0, 0, 0, 1, 1], dtype='i')
2023-01-19T14:03:09.1699606Z out_mant = np.ones(8, dtype=dtype)
2023-01-19T14:03:09.1699760Z out_exp = 2*np.ones(8, dtype='i')
2023-01-19T14:03:09.1699930Z mant, exp = np.frexp(arr[::stride], out=(out_mant[::stride], out_exp[::stride]))
2023-01-19T14:03:09.1700044Z assert_equal(mant_true[::stride], mant)
2023-01-19T14:03:09.1700159Z > assert_equal(exp_true[::stride], exp)
2023-01-19T14:03:09.1700165Z
2023-01-19T14:03:09.1700380Z arr = array([ nan, nan, inf, -inf, 0., -0., 1., -1.], dtype=float32)
2023-01-19T14:03:09.1700483Z dtype = 'f'
2023-01-19T14:03:09.1700586Z exp = array([1, 1, 0, 0, 2, 2, 2, 2], dtype=int32)
2023-01-19T14:03:09.1700697Z exp_true = array([0, 0, 0, 0, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.1700915Z mant = array([-0.5, 0.5, -0. , 0. , -inf, inf, nan, nan], dtype=float32)
2023-01-19T14:03:09.1701130Z mant_true = array([ nan, nan, inf, -inf, 0. , -0. , 0.5, -0.5], dtype=float32)
2023-01-19T14:03:09.1701240Z out_exp = array([2, 2, 2, 2, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.1701451Z out_mant = array([ nan, nan, inf, -inf, 0. , -0. , 0.5, -0.5], dtype=float32)
2023-01-19T14:03:09.1701615Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed3f0>
2023-01-19T14:03:09.1701697Z stride = -1
2023-01-19T14:03:09.1701714Z
2023-01-19T14:03:09.1701850Z numpy/core/tests/test_umath.py:1760:
2023-01-19T14:03:09.1701960Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2023-01-19T14:03:09.1701967Z
2023-01-19T14:03:09.1702252Z args = (<built-in function eq>, array([1, 1, 0, 0, 0, 0, 0, 0], dtype=int32), array([1, 1, 0, 0, 2, 2, 2, 2], dtype=int32))
2023-01-19T14:03:09.1702494Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.1702500Z
2023-01-19T14:03:09.1702572Z @wraps(func)
2023-01-19T14:03:09.1702664Z def inner(*args, **kwds):
2023-01-19T14:03:09.1702756Z with self._recreate_cm():
2023-01-19T14:03:09.1702849Z > return func(*args, **kwds)
2023-01-19T14:03:09.1702930Z E AssertionError:
2023-01-19T14:03:09.1703016Z E Arrays are not equal
2023-01-19T14:03:09.1703083Z E
2023-01-19T14:03:09.1703192Z E Mismatched elements: 4 / 8 (50%)
2023-01-19T14:03:09.1703290Z E Max absolute difference: 2
2023-01-19T14:03:09.1703389Z E Max relative difference: 1.
2023-01-19T14:03:09.1703496Z E x: array([1, 1, 0, 0, 0, 0, 0, 0], dtype=int32)
2023-01-19T14:03:09.1703607Z E y: array([1, 1, 0, 0, 2, 2, 2, 2], dtype=int32)
2023-01-19T14:03:09.1703613Z
2023-01-19T14:03:09.1703897Z args = (<built-in function eq>, array([1, 1, 0, 0, 0, 0, 0, 0], dtype=int32), array([1, 1, 0, 0, 2, 2, 2, 2], dtype=int32))
2023-01-19T14:03:09.1704038Z func = <function assert_array_compare at 0x7fb7422d4e50>
2023-01-19T14:03:09.1704327Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.1723053Z self = <contextlib._GeneratorContextManager object at 0x7fb7426404c0>
2023-01-19T14:03:09.1723296Z
2023-01-19T14:03:09.1723646Z /opt/_internal/cpython-3.10.9/lib/python3.10/contextlib.py:79: AssertionError
2023-01-19T14:03:09.1724099Z __________________________ TestFRExp.test_frexp[f-1] ___________________________
2023-01-19T14:03:09.1724300Z
2023-01-19T14:03:09.1724491Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed480>
2023-01-19T14:03:09.1724807Z dtype = 'f', stride = 1
2023-01-19T14:03:09.1724937Z
2023-01-19T14:03:09.1725126Z @pytest.mark.parametrize("stride", [-4,-2,-1,1,2,4])
2023-01-19T14:03:09.1725472Z @pytest.mark.parametrize("dtype", ['f', 'd'])
2023-01-19T14:03:09.1725840Z @pytest.mark.skipif(not sys.platform.startswith('linux'),
2023-01-19T14:03:09.1726195Z reason="np.frexp gives different answers for NAN/INF on windows and linux")
2023-01-19T14:03:09.1726489Z def test_frexp(self, dtype, stride):
2023-01-19T14:03:09.1726874Z arr = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 1.0, -1.0], dtype=dtype)
2023-01-19T14:03:09.1727619Z mant_true = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 0.5, -0.5], dtype=dtype)
2023-01-19T14:03:09.1728031Z exp_true = np.array([0, 0, 0, 0, 0, 0, 1, 1], dtype='i')
2023-01-19T14:03:09.1728299Z out_mant = np.ones(8, dtype=dtype)
2023-01-19T14:03:09.1728591Z out_exp = 2*np.ones(8, dtype='i')
2023-01-19T14:03:09.1728906Z mant, exp = np.frexp(arr[::stride], out=(out_mant[::stride], out_exp[::stride]))
2023-01-19T14:03:09.1729208Z assert_equal(mant_true[::stride], mant)
2023-01-19T14:03:09.1729466Z > assert_equal(exp_true[::stride], exp)
2023-01-19T14:03:09.1729615Z
2023-01-19T14:03:09.1729839Z arr = array([ nan, nan, inf, -inf, 0., -0., 1., -1.], dtype=float32)
2023-01-19T14:03:09.1730111Z dtype = 'f'
2023-01-19T14:03:09.1730334Z exp = array([2, 2, 2, 2, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.1730583Z exp_true = array([0, 0, 0, 0, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.1730934Z mant = array([ nan, nan, inf, -inf, 0. , -0. , 0.5, -0.5], dtype=float32)
2023-01-19T14:03:09.1731315Z mant_true = array([ nan, nan, inf, -inf, 0. , -0. , 0.5, -0.5], dtype=float32)
2023-01-19T14:03:09.1731720Z out_exp = array([2, 2, 2, 2, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.1732115Z out_mant = array([ nan, nan, inf, -inf, 0. , -0. , 0.5, -0.5], dtype=float32)
2023-01-19T14:03:09.1732439Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed480>
2023-01-19T14:03:09.1732707Z stride = 1
2023-01-19T14:03:09.1732824Z
2023-01-19T14:03:09.1732930Z numpy/core/tests/test_umath.py:1760:
2023-01-19T14:03:09.1733175Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2023-01-19T14:03:09.1733323Z
2023-01-19T14:03:09.1733611Z args = (<built-in function eq>, array([0, 0, 0, 0, 0, 0, 1, 1], dtype=int32), array([2, 2, 2, 2, 0, 0, 1, 1], dtype=int32))
2023-01-19T14:03:09.1734059Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.1734258Z
2023-01-19T14:03:09.1734332Z @wraps(func)
2023-01-19T14:03:09.1734609Z def inner(*args, **kwds):
2023-01-19T14:03:09.1734827Z with self._recreate_cm():
2023-01-19T14:03:09.1735049Z > return func(*args, **kwds)
2023-01-19T14:03:09.1735335Z E AssertionError:
2023-01-19T14:03:09.1735549Z E Arrays are not equal
2023-01-19T14:03:09.1735736Z E
2023-01-19T14:03:09.1735934Z E Mismatched elements: 4 / 8 (50%)
2023-01-19T14:03:09.1736168Z E Max absolute difference: 2
2023-01-19T14:03:09.1736393Z E Max relative difference: 1.
2023-01-19T14:03:09.1736631Z E x: array([0, 0, 0, 0, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.1736950Z E y: array([2, 2, 2, 2, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.1737094Z
2023-01-19T14:03:09.1737389Z args = (<built-in function eq>, array([0, 0, 0, 0, 0, 0, 1, 1], dtype=int32), array([2, 2, 2, 2, 0, 0, 1, 1], dtype=int32))
2023-01-19T14:03:09.1737729Z func = <function assert_array_compare at 0x7fb7422d4e50>
2023-01-19T14:03:09.1738133Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.1738497Z self = <contextlib._GeneratorContextManager object at 0x7fb7426404c0>
2023-01-19T14:03:09.1738689Z
2023-01-19T14:03:09.1738931Z /opt/_internal/cpython-3.10.9/lib/python3.10/contextlib.py:79: AssertionError
2023-01-19T14:03:09.1739325Z __________________________ TestFRExp.test_frexp[f-2] ___________________________
2023-01-19T14:03:09.1739483Z
2023-01-19T14:03:09.1739642Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed510>
2023-01-19T14:03:09.1739942Z dtype = 'f', stride = 2
2023-01-19T14:03:09.1740070Z
2023-01-19T14:03:09.1740262Z @pytest.mark.parametrize("stride", [-4,-2,-1,1,2,4])
2023-01-19T14:03:09.1740592Z @pytest.mark.parametrize("dtype", ['f', 'd'])
2023-01-19T14:03:09.1740962Z @pytest.mark.skipif(not sys.platform.startswith('linux'),
2023-01-19T14:03:09.1741308Z reason="np.frexp gives different answers for NAN/INF on windows and linux")
2023-01-19T14:03:09.1741609Z def test_frexp(self, dtype, stride):
2023-01-19T14:03:09.1741988Z arr = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 1.0, -1.0], dtype=dtype)
2023-01-19T14:03:09.1742421Z mant_true = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 0.5, -0.5], dtype=dtype)
2023-01-19T14:03:09.1742796Z exp_true = np.array([0, 0, 0, 0, 0, 0, 1, 1], dtype='i')
2023-01-19T14:03:09.1743041Z out_mant = np.ones(8, dtype=dtype)
2023-01-19T14:03:09.1743328Z out_exp = 2*np.ones(8, dtype='i')
2023-01-19T14:03:09.1743629Z mant, exp = np.frexp(arr[::stride], out=(out_mant[::stride], out_exp[::stride]))
2023-01-19T14:03:09.1743922Z assert_equal(mant_true[::stride], mant)
2023-01-19T14:03:09.1744176Z > assert_equal(exp_true[::stride], exp)
2023-01-19T14:03:09.1744324Z
2023-01-19T14:03:09.1744546Z arr = array([ nan, nan, inf, -inf, 0., -0., 1., -1.], dtype=float32)
2023-01-19T14:03:09.1744815Z dtype = 'f'
2023-01-19T14:03:09.1745017Z exp = array([2, 2, 0, 1], dtype=int32)
2023-01-19T14:03:09.1745308Z exp_true = array([0, 0, 0, 0, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.1745568Z mant = array([nan, inf, 0. , 0.5], dtype=float32)
2023-01-19T14:03:09.1745929Z mant_true = array([ nan, nan, inf, -inf, 0. , -0. , 0.5, -0.5], dtype=float32)
2023-01-19T14:03:09.1746209Z out_exp = array([2, 2, 2, 2, 0, 2, 1, 2], dtype=int32)
2023-01-19T14:03:09.1746480Z out_mant = array([nan, 1. , inf, 1. , 0. , 1. , 0.5, 1. ], dtype=float32)
2023-01-19T14:03:09.1746794Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed510>
2023-01-19T14:03:09.1747055Z stride = 2
2023-01-19T14:03:09.1747266Z
2023-01-19T14:03:09.1747373Z numpy/core/tests/test_umath.py:1760:
2023-01-19T14:03:09.1747627Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2023-01-19T14:03:09.1747762Z
2023-01-19T14:03:09.1748018Z args = (<built-in function eq>, array([0, 0, 0, 1], dtype=int32), array([2, 2, 0, 1], dtype=int32))
2023-01-19T14:03:09.1748453Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.1748656Z
2023-01-19T14:03:09.1748733Z @wraps(func)
2023-01-19T14:03:09.1748935Z def inner(*args, **kwds):
2023-01-19T14:03:09.1749145Z with self._recreate_cm():
2023-01-19T14:03:09.1749369Z > return func(*args, **kwds)
2023-01-19T14:03:09.1749596Z E AssertionError:
2023-01-19T14:03:09.1749809Z E Arrays are not equal
2023-01-19T14:03:09.1750002Z E
2023-01-19T14:03:09.1750276Z E Mismatched elements: 2 / 4 (50%)
2023-01-19T14:03:09.1750502Z E Max absolute difference: 2
2023-01-19T14:03:09.1750740Z E Max relative difference: 1.
2023-01-19T14:03:09.1750985Z E x: array([0, 0, 0, 1], dtype=int32)
2023-01-19T14:03:09.1751204Z E y: array([2, 2, 0, 1], dtype=int32)
2023-01-19T14:03:09.1751334Z
2023-01-19T14:03:09.1751593Z args = (<built-in function eq>, array([0, 0, 0, 1], dtype=int32), array([2, 2, 0, 1], dtype=int32))
2023-01-19T14:03:09.1751920Z func = <function assert_array_compare at 0x7fb7422d4e50>
2023-01-19T14:03:09.1752325Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.1752676Z self = <contextlib._GeneratorContextManager object at 0x7fb7426404c0>
2023-01-19T14:03:09.1752868Z
2023-01-19T14:03:09.1753109Z /opt/_internal/cpython-3.10.9/lib/python3.10/contextlib.py:79: AssertionError
2023-01-19T14:03:09.1753506Z __________________________ TestFRExp.test_frexp[f-4] ___________________________
2023-01-19T14:03:09.1753672Z
2023-01-19T14:03:09.1753827Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed5a0>
2023-01-19T14:03:09.1754125Z dtype = 'f', stride = 4
2023-01-19T14:03:09.1754249Z
2023-01-19T14:03:09.1754445Z @pytest.mark.parametrize("stride", [-4,-2,-1,1,2,4])
2023-01-19T14:03:09.1754787Z @pytest.mark.parametrize("dtype", ['f', 'd'])
2023-01-19T14:03:09.1755144Z @pytest.mark.skipif(not sys.platform.startswith('linux'),
2023-01-19T14:03:09.1755485Z reason="np.frexp gives different answers for NAN/INF on windows and linux")
2023-01-19T14:03:09.1755784Z def test_frexp(self, dtype, stride):
2023-01-19T14:03:09.1756159Z arr = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 1.0, -1.0], dtype=dtype)
2023-01-19T14:03:09.1756590Z mant_true = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 0.5, -0.5], dtype=dtype)
2023-01-19T14:03:09.1756962Z exp_true = np.array([0, 0, 0, 0, 0, 0, 1, 1], dtype='i')
2023-01-19T14:03:09.1757212Z out_mant = np.ones(8, dtype=dtype)
2023-01-19T14:03:09.1757505Z out_exp = 2*np.ones(8, dtype='i')
2023-01-19T14:03:09.1757806Z mant, exp = np.frexp(arr[::stride], out=(out_mant[::stride], out_exp[::stride]))
2023-01-19T14:03:09.1758111Z assert_equal(mant_true[::stride], mant)
2023-01-19T14:03:09.1758356Z > assert_equal(exp_true[::stride], exp)
2023-01-19T14:03:09.1758506Z
2023-01-19T14:03:09.1758772Z arr = array([ nan, nan, inf, -inf, 0., -0., 1., -1.], dtype=float32)
2023-01-19T14:03:09.1759044Z dtype = 'f'
2023-01-19T14:03:09.1759240Z exp = array([2, 0], dtype=int32)
2023-01-19T14:03:09.1759486Z exp_true = array([0, 0, 0, 0, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.1759733Z mant = array([nan, 0.], dtype=float32)
2023-01-19T14:03:09.1760079Z mant_true = array([ nan, nan, inf, -inf, 0. , -0. , 0.5, -0.5], dtype=float32)
2023-01-19T14:03:09.1760355Z out_exp = array([2, 2, 2, 2, 0, 2, 2, 2], dtype=int32)
2023-01-19T14:03:09.1760617Z out_mant = array([nan, 1., 1., 1., 0., 1., 1., 1.], dtype=float32)
2023-01-19T14:03:09.1767694Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed5a0>
2023-01-19T14:03:09.1767972Z stride = 4
2023-01-19T14:03:09.1768090Z
2023-01-19T14:03:09.1768188Z numpy/core/tests/test_umath.py:1760:
2023-01-19T14:03:09.1768446Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2023-01-19T14:03:09.1768594Z
2023-01-19T14:03:09.1768869Z args = (<built-in function eq>, array([0, 0], dtype=int32), array([2, 0], dtype=int32))
2023-01-19T14:03:09.1769310Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.1769511Z
2023-01-19T14:03:09.1769578Z @wraps(func)
2023-01-19T14:03:09.1769776Z def inner(*args, **kwds):
2023-01-19T14:03:09.1769993Z with self._recreate_cm():
2023-01-19T14:03:09.1770207Z > return func(*args, **kwds)
2023-01-19T14:03:09.1770556Z E AssertionError:
2023-01-19T14:03:09.1770773Z E Arrays are not equal
2023-01-19T14:03:09.1770956Z E
2023-01-19T14:03:09.1771163Z E Mismatched elements: 1 / 2 (50%)
2023-01-19T14:03:09.1771400Z E Max absolute difference: 2
2023-01-19T14:03:09.1771621Z E Max relative difference: 1.
2023-01-19T14:03:09.1771857Z E x: array([0, 0], dtype=int32)
2023-01-19T14:03:09.1772093Z E y: array([2, 0], dtype=int32)
2023-01-19T14:03:09.1772222Z
2023-01-19T14:03:09.1772466Z args = (<built-in function eq>, array([0, 0], dtype=int32), array([2, 0], dtype=int32))
2023-01-19T14:03:09.1772800Z func = <function assert_array_compare at 0x7fb7422d4e50>
2023-01-19T14:03:09.1773213Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.1773581Z self = <contextlib._GeneratorContextManager object at 0x7fb7426404c0>
2023-01-19T14:03:09.1773778Z
2023-01-19T14:03:09.1774012Z /opt/_internal/cpython-3.10.9/lib/python3.10/contextlib.py:79: AssertionError
2023-01-19T14:03:09.1774412Z __________________________ TestFRExp.test_frexp[d--4] __________________________
2023-01-19T14:03:09.1774581Z
2023-01-19T14:03:09.1774745Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed630>
2023-01-19T14:03:09.1775047Z dtype = 'd', stride = -4
2023-01-19T14:03:09.1775166Z
2023-01-19T14:03:09.1775364Z @pytest.mark.parametrize("stride", [-4,-2,-1,1,2,4])
2023-01-19T14:03:09.1775699Z @pytest.mark.parametrize("dtype", ['f', 'd'])
2023-01-19T14:03:09.1776068Z @pytest.mark.skipif(not sys.platform.startswith('linux'),
2023-01-19T14:03:09.1776410Z reason="np.frexp gives different answers for NAN/INF on windows and linux")
2023-01-19T14:03:09.1776718Z def test_frexp(self, dtype, stride):
2023-01-19T14:03:09.1777102Z arr = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 1.0, -1.0], dtype=dtype)
2023-01-19T14:03:09.1777530Z mant_true = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 0.5, -0.5], dtype=dtype)
2023-01-19T14:03:09.1777904Z exp_true = np.array([0, 0, 0, 0, 0, 0, 1, 1], dtype='i')
2023-01-19T14:03:09.1778158Z out_mant = np.ones(8, dtype=dtype)
2023-01-19T14:03:09.1778445Z out_exp = 2*np.ones(8, dtype='i')
2023-01-19T14:03:09.1778735Z mant, exp = np.frexp(arr[::stride], out=(out_mant[::stride], out_exp[::stride]))
2023-01-19T14:03:09.1779088Z assert_equal(mant_true[::stride], mant)
2023-01-19T14:03:09.1779346Z > assert_equal(exp_true[::stride], exp)
2023-01-19T14:03:09.1779494Z
2023-01-19T14:03:09.1779682Z arr = array([ nan, nan, inf, -inf, 0., -0., 1., -1.])
2023-01-19T14:03:09.1779937Z dtype = 'd'
2023-01-19T14:03:09.1780142Z exp = array([1, 2], dtype=int32)
2023-01-19T14:03:09.1780386Z exp_true = array([0, 0, 0, 0, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.1780648Z mant = array([-0.5, -inf])
2023-01-19T14:03:09.1780972Z mant_true = array([ nan, nan, inf, -inf, 0. , -0. , 0.5, -0.5])
2023-01-19T14:03:09.1781237Z out_exp = array([2, 2, 2, 2, 2, 2, 2, 1], dtype=int32)
2023-01-19T14:03:09.1781551Z out_mant = array([ 1. , 1. , 1. , -inf, 1. , 1. , 1. , -0.5])
2023-01-19T14:03:09.1781862Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed630>
2023-01-19T14:03:09.1782139Z stride = -4
2023-01-19T14:03:09.1782251Z
2023-01-19T14:03:09.1782350Z numpy/core/tests/test_umath.py:1760:
2023-01-19T14:03:09.1782600Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2023-01-19T14:03:09.1782747Z
2023-01-19T14:03:09.1782988Z args = (<built-in function eq>, array([1, 0], dtype=int32), array([1, 2], dtype=int32))
2023-01-19T14:03:09.1783424Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.1783612Z
2023-01-19T14:03:09.1783686Z @wraps(func)
2023-01-19T14:03:09.1783938Z def inner(*args, **kwds):
2023-01-19T14:03:09.1784151Z with self._recreate_cm():
2023-01-19T14:03:09.1784362Z > return func(*args, **kwds)
2023-01-19T14:03:09.1784578Z E AssertionError:
2023-01-19T14:03:09.1784789Z E Arrays are not equal
2023-01-19T14:03:09.1784968Z E
2023-01-19T14:03:09.1785174Z E Mismatched elements: 1 / 2 (50%)
2023-01-19T14:03:09.1785407Z E Max absolute difference: 2
2023-01-19T14:03:09.1785627Z E Max relative difference: 1.
2023-01-19T14:03:09.1785859Z E x: array([1, 0], dtype=int32)
2023-01-19T14:03:09.1786086Z E y: array([1, 2], dtype=int32)
2023-01-19T14:03:09.1786210Z
2023-01-19T14:03:09.1786459Z args = (<built-in function eq>, array([1, 0], dtype=int32), array([1, 2], dtype=int32))
2023-01-19T14:03:09.1786768Z func = <function assert_array_compare at 0x7fb7422d4e50>
2023-01-19T14:03:09.1787430Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.1787802Z self = <contextlib._GeneratorContextManager object at 0x7fb7426404c0>
2023-01-19T14:03:09.1787999Z
2023-01-19T14:03:09.1788238Z /opt/_internal/cpython-3.10.9/lib/python3.10/contextlib.py:79: AssertionError
2023-01-19T14:03:09.1788643Z __________________________ TestFRExp.test_frexp[d--2] __________________________
2023-01-19T14:03:09.1788809Z
2023-01-19T14:03:09.1788978Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed6c0>
2023-01-19T14:03:09.1789290Z dtype = 'd', stride = -2
2023-01-19T14:03:09.1789410Z
2023-01-19T14:03:09.1789610Z @pytest.mark.parametrize("stride", [-4,-2,-1,1,2,4])
2023-01-19T14:03:09.1789946Z @pytest.mark.parametrize("dtype", ['f', 'd'])
2023-01-19T14:03:09.1790310Z @pytest.mark.skipif(not sys.platform.startswith('linux'),
2023-01-19T14:03:09.1790648Z reason="np.frexp gives different answers for NAN/INF on windows and linux")
2023-01-19T14:03:09.1790953Z def test_frexp(self, dtype, stride):
2023-01-19T14:03:09.1791347Z arr = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 1.0, -1.0], dtype=dtype)
2023-01-19T14:03:09.1791785Z mant_true = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 0.5, -0.5], dtype=dtype)
2023-01-19T14:03:09.1792148Z exp_true = np.array([0, 0, 0, 0, 0, 0, 1, 1], dtype='i')
2023-01-19T14:03:09.1792407Z out_mant = np.ones(8, dtype=dtype)
2023-01-19T14:03:09.1792768Z out_exp = 2*np.ones(8, dtype='i')
2023-01-19T14:03:09.1793054Z mant, exp = np.frexp(arr[::stride], out=(out_mant[::stride], out_exp[::stride]))
2023-01-19T14:03:09.1793353Z assert_equal(mant_true[::stride], mant)
2023-01-19T14:03:09.1793604Z > assert_equal(exp_true[::stride], exp)
2023-01-19T14:03:09.1793754Z
2023-01-19T14:03:09.1793954Z arr = array([ nan, nan, inf, -inf, 0., -0., 1., -1.])
2023-01-19T14:03:09.1794203Z dtype = 'd'
2023-01-19T14:03:09.1794412Z exp = array([1, 0, 2, 2], dtype=int32)
2023-01-19T14:03:09.1794660Z exp_true = array([0, 0, 0, 0, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.1794946Z mant = array([-0.5, -0. , -inf, nan])
2023-01-19T14:03:09.1795269Z mant_true = array([ nan, nan, inf, -inf, 0. , -0. , 0.5, -0.5])
2023-01-19T14:03:09.1795532Z out_exp = array([2, 2, 2, 2, 2, 0, 2, 1], dtype=int32)
2023-01-19T14:03:09.1795855Z out_mant = array([ 1. , nan, 1. , -inf, 1. , -0. , 1. , -0.5])
2023-01-19T14:03:09.1796172Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed6c0>
2023-01-19T14:03:09.1796452Z stride = -2
2023-01-19T14:03:09.1796569Z
2023-01-19T14:03:09.1796663Z numpy/core/tests/test_umath.py:1760:
2023-01-19T14:03:09.1796919Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2023-01-19T14:03:09.1797064Z
2023-01-19T14:03:09.1797321Z args = (<built-in function eq>, array([1, 0, 0, 0], dtype=int32), array([1, 0, 2, 2], dtype=int32))
2023-01-19T14:03:09.1797751Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.1798004Z
2023-01-19T14:03:09.1798070Z @wraps(func)
2023-01-19T14:03:09.1798263Z def inner(*args, **kwds):
2023-01-19T14:03:09.1798475Z with self._recreate_cm():
2023-01-19T14:03:09.1798682Z > return func(*args, **kwds)
2023-01-19T14:03:09.1798903Z E AssertionError:
2023-01-19T14:03:09.1799118Z E Arrays are not equal
2023-01-19T14:03:09.1799297Z E
2023-01-19T14:03:09.1799500Z E Mismatched elements: 2 / 4 (50%)
2023-01-19T14:03:09.1799735Z E Max absolute difference: 2
2023-01-19T14:03:09.1799955Z E Max relative difference: 1.
2023-01-19T14:03:09.1800192Z E x: array([1, 0, 0, 0], dtype=int32)
2023-01-19T14:03:09.1800425Z E y: array([1, 0, 2, 2], dtype=int32)
2023-01-19T14:03:09.1800562Z
2023-01-19T14:03:09.1800825Z args = (<built-in function eq>, array([1, 0, 0, 0], dtype=int32), array([1, 0, 2, 2], dtype=int32))
2023-01-19T14:03:09.1801143Z func = <function assert_array_compare at 0x7fb7422d4e50>
2023-01-19T14:03:09.1801545Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.1801903Z self = <contextlib._GeneratorContextManager object at 0x7fb7426404c0>
2023-01-19T14:03:09.1802095Z
2023-01-19T14:03:09.1802337Z /opt/_internal/cpython-3.10.9/lib/python3.10/contextlib.py:79: AssertionError
2023-01-19T14:03:09.1802727Z __________________________ TestFRExp.test_frexp[d--1] __________________________
2023-01-19T14:03:09.1802895Z
2023-01-19T14:03:09.1803053Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed750>
2023-01-19T14:03:09.1803353Z dtype = 'd', stride = -1
2023-01-19T14:03:09.1803478Z
2023-01-19T14:03:09.1803661Z @pytest.mark.parametrize("stride", [-4,-2,-1,1,2,4])
2023-01-19T14:03:09.1803994Z @pytest.mark.parametrize("dtype", ['f', 'd'])
2023-01-19T14:03:09.1804351Z @pytest.mark.skipif(not sys.platform.startswith('linux'),
2023-01-19T14:03:09.1804691Z reason="np.frexp gives different answers for NAN/INF on windows and linux")
2023-01-19T14:03:09.1804985Z def test_frexp(self, dtype, stride):
2023-01-19T14:03:09.1805365Z arr = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 1.0, -1.0], dtype=dtype)
2023-01-19T14:03:09.1805795Z mant_true = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 0.5, -0.5], dtype=dtype)
2023-01-19T14:03:09.1806226Z exp_true = np.array([0, 0, 0, 0, 0, 0, 1, 1], dtype='i')
2023-01-19T14:03:09.1806485Z out_mant = np.ones(8, dtype=dtype)
2023-01-19T14:03:09.1806773Z out_exp = 2*np.ones(8, dtype='i')
2023-01-19T14:03:09.1807059Z mant, exp = np.frexp(arr[::stride], out=(out_mant[::stride], out_exp[::stride]))
2023-01-19T14:03:09.1807360Z assert_equal(mant_true[::stride], mant)
2023-01-19T14:03:09.1807612Z > assert_equal(exp_true[::stride], exp)
2023-01-19T14:03:09.1807761Z
2023-01-19T14:03:09.1807958Z arr = array([ nan, nan, inf, -inf, 0., -0., 1., -1.])
2023-01-19T14:03:09.1808203Z dtype = 'd'
2023-01-19T14:03:09.1808423Z exp = array([1, 1, 0, 0, 2, 2, 2, 2], dtype=int32)
2023-01-19T14:03:09.1808671Z exp_true = array([0, 0, 0, 0, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.1808992Z mant = array([-0.5, 0.5, -0. , 0. , -inf, inf, nan, nan])
2023-01-19T14:03:09.1809337Z mant_true = array([ nan, nan, inf, -inf, 0. , -0. , 0.5, -0.5])
2023-01-19T14:03:09.1809600Z out_exp = array([2, 2, 2, 2, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.1809914Z out_mant = array([ nan, nan, inf, -inf, 0. , -0. , 0.5, -0.5])
2023-01-19T14:03:09.1810234Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed750>
2023-01-19T14:03:09.1810517Z stride = -1
2023-01-19T14:03:09.1810635Z
2023-01-19T14:03:09.1810741Z numpy/core/tests/test_umath.py:1760:
2023-01-19T14:03:09.1810984Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2023-01-19T14:03:09.1811175Z
2023-01-19T14:03:09.1811457Z args = (<built-in function eq>, array([1, 1, 0, 0, 0, 0, 0, 0], dtype=int32), array([1, 1, 0, 0, 2, 2, 2, 2], dtype=int32))
2023-01-19T14:03:09.1811894Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.1812088Z
2023-01-19T14:03:09.1812160Z @wraps(func)
2023-01-19T14:03:09.1812345Z def inner(*args, **kwds):
2023-01-19T14:03:09.1812557Z with self._recreate_cm():
2023-01-19T14:03:09.1812774Z > return func(*args, **kwds)
2023-01-19T14:03:09.1812986Z E AssertionError:
2023-01-19T14:03:09.1813194Z E Arrays are not equal
2023-01-19T14:03:09.1813381Z E
2023-01-19T14:03:09.1813583Z E Mismatched elements: 4 / 8 (50%)
2023-01-19T14:03:09.1813815Z E Max absolute difference: 2
2023-01-19T14:03:09.1814045Z E Max relative difference: 1.
2023-01-19T14:03:09.1814288Z E x: array([1, 1, 0, 0, 0, 0, 0, 0], dtype=int32)
2023-01-19T14:03:09.1814539Z E y: array([1, 1, 0, 0, 2, 2, 2, 2], dtype=int32)
2023-01-19T14:03:09.1814673Z
2023-01-19T14:03:09.1814961Z args = (<built-in function eq>, array([1, 1, 0, 0, 0, 0, 0, 0], dtype=int32), array([1, 1, 0, 0, 2, 2, 2, 2], dtype=int32))
2023-01-19T14:03:09.2527795Z func = <function assert_array_compare at 0x7fb7422d4e50>
2023-01-19T14:03:09.2528416Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.2528786Z self = <contextlib._GeneratorContextManager object at 0x7fb7426404c0>
2023-01-19T14:03:09.2528978Z
2023-01-19T14:03:09.2529241Z /opt/_internal/cpython-3.10.9/lib/python3.10/contextlib.py:79: AssertionError
2023-01-19T14:03:09.2529654Z __________________________ TestFRExp.test_frexp[d-1] ___________________________
2023-01-19T14:03:09.2529825Z
2023-01-19T14:03:09.2529991Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed7e0>
2023-01-19T14:03:09.2530301Z dtype = 'd', stride = 1
2023-01-19T14:03:09.2530428Z
2023-01-19T14:03:09.2530635Z @pytest.mark.parametrize("stride", [-4,-2,-1,1,2,4])
2023-01-19T14:03:09.2530971Z @pytest.mark.parametrize("dtype", ['f', 'd'])
2023-01-19T14:03:09.2531331Z @pytest.mark.skipif(not sys.platform.startswith('linux'),
2023-01-19T14:03:09.2531672Z reason="np.frexp gives different answers for NAN/INF on windows and linux")
2023-01-19T14:03:09.2532217Z def test_frexp(self, dtype, stride):
2023-01-19T14:03:09.2532627Z arr = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 1.0, -1.0], dtype=dtype)
2023-01-19T14:03:09.2533062Z mant_true = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 0.5, -0.5], dtype=dtype)
2023-01-19T14:03:09.2533447Z exp_true = np.array([0, 0, 0, 0, 0, 0, 1, 1], dtype=<
9941
span class="pl-s">'i')
2023-01-19T14:03:09.2533709Z out_mant = np.ones(8, dtype=dtype)
2023-01-19T14:03:09.2533997Z out_exp = 2*np.ones(8, dtype='i')
2023-01-19T14:03:09.2534321Z mant, exp = np.frexp(arr[::stride], out=(out_mant[::stride], out_exp[::stride]))
2023-01-19T14:03:09.2534625Z assert_equal(mant_true[::stride], mant)
2023-01-19T14:03:09.2534883Z > assert_equal(exp_true[::stride], exp)
2023-01-19T14:03:09.2535034Z
2023-01-19T14:03:09.2535223Z arr = array([ nan, nan, inf, -inf, 0., -0., 1., -1.])
2023-01-19T14:03:09.2535484Z dtype = 'd'
2023-01-19T14:03:09.2535711Z exp = array([2, 2, 2, 2, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.2535954Z exp_true = array([0, 0, 0, 0, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.2536279Z mant = array([ nan, nan, inf, -inf, 0. , -0. , 0.5, -0.5])
2023-01-19T14:03:09.2536617Z mant_true = array([ nan, nan, inf, -inf, 0. , -0. , 0.5, -0.5])
2023-01-19T14:03:09.2536874Z out_exp = array([2, 2, 2, 2, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.2537194Z out_mant = array([ nan, nan, inf, -inf, 0. , -0. , 0.5, -0.5])
2023-01-19T14:03:09.2537670Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed7e0>
2023-01-19T14:03:09.2537940Z stride = 1
2023-01-19T14:03:09.2538047Z
2023-01-19T14:03:09.2538153Z numpy/core/tests/test_umath.py:1760:
2023-01-19T14:03:09.2538409Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2023-01-19T14:03:09.2538555Z
2023-01-19T14:03:09.2538842Z args = (<built-in function eq>, array([0, 0, 0, 0, 0, 0, 1, 1], dtype=int32), array([2, 2, 2, 2, 0, 0, 1, 1], dtype=int32))
2023-01-19T14:03:09.2539294Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.2539485Z
2023-01-19T14:03:09.2539561Z @wraps(func)
2023-01-19T14:03:09.2539766Z def inner(*args, **kwds):
2023-01-19T14:03:09.2539990Z with self._recreate_cm():
2023-01-19T14:03:09.2540203Z > return func(*args, **kwds)
2023-01-19T14:03:09.2540427Z E AssertionError:
2023-01-19T14:03:09.2540646Z E Arrays are not equal
2023-01-19T14:03:09.2540830Z E
2023-01-19T14:03:09.2541035Z E Mismatched elements: 4 / 8 (50%)
2023-01-19T14:03:09.2541270Z E Max absolute difference: 2
2023-01-19T14:03:09.2541493Z E Max relative difference: 1.
2023-01-19T14:03:09.2541738Z E x: array([0, 0, 0, 0, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.2541986Z E y: array([2, 2, 2, 2, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.2542123Z
2023-01-19T14:03:09.2542414Z args = (<built-in function eq>, array([0, 0, 0, 0, 0, 0, 1, 1], dtype=int32), array([2, 2, 2, 2, 0, 0, 1, 1], dtype=int32))
2023-01-19T14:03:09.2542742Z func = <function assert_array_compare at 0x7fb7422d4e50>
2023-01-19T14:03:09.2543149Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.2543504Z self = <contextlib._GeneratorContextManager object at 0x7fb7426404c0>
2023-01-19T14:03:09.2543696Z
2023-01-19T14:03:09.2543931Z /opt/_internal/cpython-3.10.9/lib/python3.10/contextlib.py:79: AssertionError
2023-01-19T14:03:09.2544340Z __________________________ TestFRExp.test_frexp[d-2] ___________________________
2023-01-19T14:03:09.2544504Z
2023-01-19T14:03:09.2544663Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed870>
2023-01-19T14:03:09.2544964Z dtype = 'd', stride = 2
2023-01-19T14:03:09.2545079Z
2023-01-19T14:03:09.2545271Z @pytest.mark.parametrize("stride", [-4,-2,-1,1,2,4])
2023-01-19T14:03:09.2545663Z @pytest.mark.parametrize("dtype", ['f', 'd'])
2023-01-19T14:03:09.2546033Z @pytest.mark.skipif(not sys.platform.startswith('linux'),
2023-01-19T14:03:09.2546374Z reason="np.frexp gives different answers for NAN/INF on windows and linux")
2023-01-19T14:03:09.2546672Z def test_frexp(self, dtype, stride):
2023-01-19T14:03:09.2547056Z arr = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 1.0, -1.0], dtype=dtype)
2023-01-19T14:03:09.2547664Z mant_true = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 0.5, -0.5], dtype=dtype)
2023-01-19T14:03:09.2548037Z exp_true = np.array([0, 0, 0, 0, 0, 0, 1, 1], dtype='i')
2023-01-19T14:03:09.2548299Z out_mant = np.ones(8, dtype=dtype)
2023-01-19T14:03:09.2548595Z out_exp = 2*np.ones(8, dtype='i')
2023-01-19T14:03:09.2548887Z mant, exp = np.frexp(arr[::stride], out=(out_mant[::stride], out_exp[::stride]))
2023-01-19T14:03:09.2549192Z assert_equal(mant_true[::stride], mant)
2023-01-19T14:03:09.2549458Z > assert_equal(exp_true[::stride], exp)
2023-01-19T14:03:09.2549611Z
2023-01-19T14:03:09.2549807Z arr = array([ nan, nan, inf, -inf, 0., -0., 1., -1.])
2023-01-19T14:03:09.2550059Z dtype = 'd'
2023-01-19T14:03:09.2550276Z exp = array([2, 2, 0, 1], dtype=int32)
2023-01-19T14:03:09.2550527Z exp_true = array([0, 0, 0, 0, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.2550760Z mant = array([nan, inf, 0. , 0.5])
2023-01-19T14:03:09.2551091Z mant_true = array([ nan, nan, inf, -inf, 0. , -0. , 0.5, -0.5])
2023-01-19T14:03:09.2551437Z out_exp = array([2, 2, 2, 2, 0, 2, 1, 2], dtype=int32)
2023-01-19T14:03:09.2551687Z out_mant = array([nan, 1. , inf, 1. , 0. , 1. , 0.5, 1. ])
2023-01-19T14:03:09.2551995Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed870>
2023-01-19T14:03:09.2552260Z stride = 2
2023-01-19T14:03:09.2552373Z
2023-01-19T14:03:09.2552470Z numpy/core/tests/test_umath.py:1760:
2023-01-19T14:03:09.2552721Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2023-01-19T14:03:09.2552865Z
2023-01-19T14:03:09.2553120Z args = (<built-in function eq>, array([0, 0, 0, 1], dtype=int32), array([2, 2, 0, 1], dtype=int32))
2023-01-19T14:03:09.2553549Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.2553746Z
2023-01-19T14:03:09.2553810Z @wraps(func)
2023-01-19T14:03:09.2554002Z def inner(*args, **kwds):
2023-01-19T14:03:09.2554221Z with self._recreate_cm():
2023-01-19T14:03:09.2554432Z > return func(*args, **kwds)
2023-01-19T14:03:09.2554649Z E AssertionError:
2023-01-19T14:03:09.2554869Z E Arrays are not equal
2023-01-19T14:03:09.2555054Z E
2023-01-19T14:03:09.2555271Z E Mismatched elements: 2 / 4 (50%)
2023-01-19T14:03:09.2555506Z E Max absolute difference: 2
2023-01-19T14:03:09.2555734Z E Max relative difference: 1.
2023-01-19T14:03:09.2555963Z E x: array([0, 0, 0, 1], dtype=int32)
2023-01-19T14:03:09.2556198Z E y: array([2, 2, 0, 1], dtype=int32)
2023-01-19T14:03:09.2556334Z
2023-01-19T14:03:09.2556596Z args = (<built-in function eq>, array([0, 0, 0, 1], dtype=int32), array([2, 2, 0, 1], dtype=int32))
2023-01-19T14:03:09.2556917Z func = <function assert_array_compare at 0x7fb7422d4e50>
2023-01-19T14:03:09.2557325Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.2557684Z self = <contextlib._GeneratorContextManager object at 0x7fb7426404c0>
2023-01-19T14:03:09.2557878Z
2023-01-19T14:03:09.2558118Z /opt/_internal/cpython-3.10.9/lib/python3.10/contextlib.py:79: AssertionError
2023-01-19T14:03:09.2558505Z __________________________ TestFRExp.test_frexp[d-4] ___________________________
2023-01-19T14:03:09.2558671Z
2023-01-19T14:03:09.2558831Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed900>
2023-01-19T14:03:09.2559188Z dtype = 'd', stride = 4
2023-01-19T14:03:09.2559318Z
2023-01-19T14:03:09.2559507Z @pytest.mark.parametrize("stride", [-4,-2,-1,1,2,4])
2023-01-19T14:03:09.2559845Z @pytest.mark.parametrize("dtype", ['f', 'd'])
2023-01-19T14:03:09.2560210Z @pytest.mark.skipif(not sys.platform.startswith('linux'),
2023-01-19T14:03:09.2560556Z reason="np.frexp gives different answers for NAN/INF on windows and linux")
2023-01-19T14:03:09.2560844Z def test_frexp(self, dtype, stride):
2023-01-19T14:03:09.2561224Z arr = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 1.0, -1.0], dtype=dtype)
2023-01-19T14:03:09.2561657Z mant_true = np.array([np.nan, np.nan, np.inf, -np.inf, 0.0, -0.0, 0.5, -0.5], dtype=dtype)
2023-01-19T14:03:09.2562020Z exp_true = np.array([0, 0, 0, 0, 0, 0, 1, 1], dtype='i')
2023-01-19T14:03:09.2562277Z out_mant = np.ones(8, dtype=dtype)
2023-01-19T14:03:09.2562562Z out_exp = 2*np.ones(8, dtype='i')
2023-01-19T14:03:09.2562847Z mant, exp = np.frexp(arr[::stride], out=(out_mant[::stride], out_exp[::stride]))
2023-01-19T14:03:09.2563145Z assert_equal(mant_true[::stride], mant)
2023-01-19T14:03:09.2563399Z > assert_equal(exp_true[::stride], exp)
2023-01-19T14:03:09.2563545Z
2023-01-19T14:03:09.2563737Z arr = array([ nan, nan, inf, -inf, 0., -0., 1., -1.])
2023-01-19T14:03:09.2563984Z dtype = 'd'
2023-01-19T14:03:09.2564193Z exp = array([2, 0], dtype=int32)
2023-01-19T14:03:09.2564446Z exp_true = array([0, 0, 0, 0, 0, 0, 1, 1], dtype=int32)
2023-01-19T14:03:09.2564714Z mant = array([nan, 0.])
2023-01-19T14:03:09.2565033Z mant_true = array([ nan, nan, inf, -inf, 0. , -0. , 0.5, -0.5])
2023-01-19T14:03:09.2565301Z out_exp = array([2, 2, 2, 2, 0, 2, 2, 2], dtype=int32)
2023-01-19T14:03:09.2565551Z out_mant = array([nan, 1., 1., 1., 0., 1., 1., 1.])
2023-01-19T14:03:09.2565856Z self = <numpy.core.tests.test_umath.TestFRExp object at 0x7fb73e3ed900>
2023-01-19T14:03:09.2566116Z stride = 4
2023-01-19T14:03:09.2566231Z
2023-01-19T14:03:09.2566332Z numpy/core/tests/test_umath.py:1760:
2023-01-19T14:03:09.2566572Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
2023-01-19T14:03:09.2566713Z
2023-01-19T14:03:09.2566950Z args = (<built-in function eq>, array([0, 0], dtype=int32), array([2, 0], dtype=int32))
2023-01-19T14:03:09.2567373Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.2567573Z
2023-01-19T14:03:09.2567638Z @wraps(func)
2023-01-19T14:03:09.2567840Z def inner(*args, **kwds):
2023-01-19T14:03:09.2568055Z with self._recreate_cm():
2023-01-19T14:03:09.2568263Z > return func(*args, **kwds)
2023-01-19T14:03:09.2568481Z E AssertionError:
2023-01-19T14:03:09.2568697Z E Arrays are not equal
2023-01-19T14:03:09.2568887Z E
2023-01-19T14:03:09.2569084Z E Mismatched elements: 1 / 2 (50%)
2023-01-19T14:03:09.2569320Z E Max absolute difference: 2
2023-01-19T14:03:09.2569554Z E Max relative difference: 1.
2023-01-19T14:03:09.2569777Z E x: array([0, 0], dtype=int32)
2023-01-19T14:03:09.2570000Z E y: array([2, 0], dtype=int32)
2023-01-19T14:03:09.2570127Z
2023-01-19T14:03:09.2570374Z args = (<built-in function eq>, array([0, 0], dtype=int32), array([2, 0], dtype=int32))
2023-01-19T14:03:09.2570687Z func = <function assert_array_compare at 0x7fb7422d4e50>
2023-01-19T14:03:09.2918562Z kwds = {'err_msg': '', 'header': 'Arrays are not equal', 'strict': False, 'verbose': True}
2023-01-19T14:03:09.2918967Z self = <contextlib._GeneratorContextManager object at 0x7fb7426404c0>
2023-01-19T14:03:09.2919178Z
2023-01-19T14:03:09.2919452Z /opt/_internal/cpython-3.10.9/lib/python3.10/contextlib.py:79: AssertionError
Runtime information:
python3.10
, numpy main, musllinux_x86_64
Context for the issue:
No response