You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "mroeschke (via GitHub)" <gi...@apache.org> on 2023/04/05 21:53:16 UTC
[GitHub] [arrow] mroeschke opened a new issue, #34913: [BUG]: pyarrow.compute.mean overflowing when numeric sum exceeds int64 max
mroeschke opened a new issue, #34913:
URL: https://github.com/apache/arrow/issues/34913
### Describe the bug, including details regarding any error messages, version, and platform.
```
In [15]: import numpy as np; import pyarrow as pa
In [16]: pa.compute.mean(pa.array([np.iinfo(np.int64).max, 1]))
Out[16]: <pyarrow.DoubleScalar: -4.611686018427388e+18>
In [17]: pa.__version__
Out[17]: '11.0.0'
```
Haven't checked, but I suspect if mean is calculated as `sum(values) / len(values)`, `sum(values)` might be overflowing before performing the divisor.
### Component(s)
Python
--
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: issues-unsubscribe@arrow.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] assignUser commented on issue #34913: [Python]: pyarrow.compute.mean overflowing when numeric sum exceeds int64 max
Posted by "assignUser (via GitHub)" <gi...@apache.org>.
assignUser commented on issue #34913:
URL: https://github.com/apache/arrow/issues/34913#issuecomment-1498207232
Thanks for the very clear reprex!
I am going to close this though as it is a duplicate of #34909
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] mroeschke commented on issue #34913: [Python]: pyarrow.compute.mean overflowing when numeric sum exceeds int64 max
Posted by "mroeschke (via GitHub)" <gi...@apache.org>.
mroeschke commented on issue #34913:
URL: https://github.com/apache/arrow/issues/34913#issuecomment-1498208490
Thanks! Sorry for not searching the issue tracker first
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [arrow] assignUser closed issue #34913: [Python]: pyarrow.compute.mean overflowing when numeric sum exceeds int64 max
Posted by "assignUser (via GitHub)" <gi...@apache.org>.
assignUser closed issue #34913: [Python]: pyarrow.compute.mean overflowing when numeric sum exceeds int64 max
URL: https://github.com/apache/arrow/issues/34913
--
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: issues-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org