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

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

Yibo Cai created ARROW-11567:
--------------------------------

             Summary: [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


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)