You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Antoine Pitrou (Jira)" <ji...@apache.org> on 2021/03/02 13:08:00 UTC

[jira] [Resolved] (ARROW-11567) [C++][Compute] Variance kernel has precision issue

     [ https://issues.apache.org/jira/browse/ARROW-11567?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Antoine Pitrou resolved ARROW-11567.
------------------------------------
    Fix Version/s: 4.0.0
       Resolution: Fixed

Issue resolved by pull request 9604
[https://github.com/apache/arrow/pull/9604]

> [C++][Compute] Variance kernel has precision issue
> --------------------------------------------------
>
>                 Key: ARROW-11567
>                 URL: https://issues.apache.org/jira/browse/ARROW-11567
>             Project: Apache Arrow
>          Issue Type: Bug
>          Components: C++
>    Affects Versions: 3.0.0
>            Reporter: Yibo Cai
>            Assignee: Yibo Cai
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> For long arrays, variance kernel is not accurate compared with numpy. See below example.
> {noformat}
> In [1]: import numpy as np
> In [2]: import pyarrow.compute as pc
> In [3]: t = np.arange(321000, dtype='float')
> In [4]: np.var(t)
> Out[4]: 8586749999.916667
> In [5]: pc.variance(t)
> Out[5]: <pyarrow.DoubleScalar: 8586749999.899047>
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)