jorisvandenbossche commented on issue #34909: URL: https://github.com/apache/arrow/issues/34909#issuecomment-1499342801
Numpy will always perform the actual operation on floats, so if calculating the mean of integers, those are cast to float64 at the start. In addition, they also cast float16 to float32 for the intermediates, for the other float inputs, they keep the precision. In addition to doing this with floats, to improve the precision of the operation, pandas also recently switched to use Kahan summation (https://en.wikipedia.org/wiki/Kahan_summation_algorithm). I think numpy uses pairwise summation instead (https://en.wikipedia.org/wiki/Pairwise_summation) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
