Skip to content

[CI][Python] New unbiased skew and kurtosis test fails on test-debian-12-python-3-i386 #45926

Closed

Description

@raulcd

Describe the bug, including details regarding any error messages, version, and platform.

The test-debian-12-python-3-i386 job fails with:

______________ test_unbiased_skew_and_kurtosis[input0-expected0] _______________

input = [1.0, 2.0, 3.0, 40.0, None]
expected = {'kurtosis': 3.9631931024230695, 'skew': 1.988947740397821}

    @pytest.mark.parametrize("input, expected", (
        (
            [1.0, 2.0, 3.0, 40.0, None],
            {'skew': 1.988947740397821, 'kurtosis': 3.9631931024230695}
        ),
        ([1, 2, 40], {'skew': 1.7281098503730385, 'kurtosis': None}),
        ([1, 40], {'skew': None, 'kurtosis': None}),
    ))
    def test_unbiased_skew_and_kurtosis(input, expected):
        arrow_skew = pc.skew(input, skip_nulls=True, biased=False)
        arrow_kurtosis = pc.kurtosis(input, skip_nulls=True, biased=False)
        assert arrow_skew == pa.scalar(expected['skew'], type=pa.float64())
>       assert arrow_kurtosis == pa.scalar(expected['kurtosis'], type=pa.float64())
E       assert <pyarrow.DoubleScalar: 3.9631931024230713> == <pyarrow.DoubleScalar: 3.9631931024230695>
E        +  where <pyarrow.DoubleScalar: 3.9631931024230695> = <cyfunction scalar at 0xe097a648>(3.9631931024230695, type=DataType(double))
E        +    where <cyfunction scalar at 0xe097a648> = pa.scalar
E        +    and   DataType(double) = <cyfunction float64 at 0xe0977b70>()
E        +      where <cyfunction float64 at 0xe0977b70> = pa.float64

arrow-dev/lib/python3.11/site-packages/pyarrow/tests/test_compute.py:473: AssertionError
______________ test_unbiased_skew_and_kurtosis[input1-expected1] _______________

input = [1, 2, 40], expected = {'kurtosis': None, 'skew': 1.7281098503730385}

    @pytest.mark.parametrize("input, expected", (
        (
            [1.0, 2.0, 3.0, 40.0, None],
            {'skew': 1.988947740397821, 'kurtosis': 3.9631931024230695}
        ),
        ([1, 2, 40], {'skew': 1.7281098503730385, 'kurtosis': None}),
        ([1, 40], {'skew': None, 'kurtosis': None}),
    ))
    def test_unbiased_skew_and_kurtosis(input, expected):
        arrow_skew = pc.skew(input, skip_nulls=True, biased=False)
        arrow_kurtosis = pc.kurtosis(input, skip_nulls=True, biased=False)
>       assert arrow_skew == pa.scalar(expected['skew'], type=pa.float64())
E       assert <pyarrow.DoubleScalar: 1.7281098503730388> == <pyarrow.DoubleScalar: 1.7281098503730385>
E        +  where <pyarrow.DoubleScalar: 1.7281098503730385> = <cyfunction scalar at 0xe097a648>(1.7281098503730385, type=DataType(double))
E        +    where <cyfunction scalar at 0xe097a648> = pa.scalar
E        +    and   DataType(double) = <cyfunction float64 at 0xe0977b70>()
E        +      where <cyfunction float64 at 0xe0977b70> = pa.float64

Component(s)

Python, Continuous Integration

Activity

  1. added a commit that references this issue on Mar 25, 2025
  2. added a commit that references this issue on Mar 25, 2025
  3. added this to the 20.0.0 milestone on Mar 25, 2025
  4. raulcd commented on Mar 25, 2025

    @raulcd
    MemberAuthor

    Issue resolved by pull request 45929
    #45929

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions