Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-11567

[C++][Compute] Variance kernel has precision issue

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.0.0
    • 4.0.0
    • C++

    Description

      For long arrays, variance kernel is not accurate compared with numpy. See below example.

      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>
      

      Attachments

        Issue Links

          Activity

            People

              yibocai Yibo Cai
              yibocai Yibo Cai
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m