Taking the mean of a long-spanning np.datetime64
array produces the wrong value
#10019
Open
5 tasks done
Labels
What happened?
As noted in #9977 (comment), taking the mean of a
np.datetime64
array with values that span more than half of the resolution-dependent range produces the incorrect result, e.g.:This is due to overflow when computing the timedeltas relative to the minimum datetime value of the array (code).
What did you expect to happen?
This is the outcome we would expect to see in this example:
Minimal Complete Verifiable Example
MVCE confirmation
Relevant log output
Anything else we need to know?
No response
Environment
The text was updated successfully, but these errors were encountered: