You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/03/01 09:32:00 UTC

[jira] [Updated] (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 ]

ASF GitHub Bot updated ARROW-11567:
-----------------------------------
    Labels: pull-request-available  (was: )

> [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
>          Time Spent: 10m
>  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)