-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closes #8943: COMPAT: periods needs coercion to np.int64 #9078
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
does the test actually trigger the error? pls add a release note (bug fixes in v0.16.0) as well |
100701e
to
7d2dc6b
Compare
Yes it does. In fact, it was overkill, so I simplified the test and set I tested it on 32-bit Linux (in VirtualBox) without the type conversions and it fails as expected.
|
Also, I added "(bug fixes in v0.16.0)" to the commit message. Is that what you meant by "add a release note"? |
@Garrett-R see here for release notes: https://github.com/pydata/pandas/blob/master/doc/source/whatsnew/v0.16.0.txt take a look at one of the older ones for examples. |
Oh, haha, thanks! I'll take a look. |
83008b9
to
7b127d9
Compare
@@ -48,3 +48,6 @@ Bug Fixes | |||
~~~~~~~~~ | |||
|
|||
.. _whatsnew_0160.bug_fixes: | |||
|
|||
- Fixed compatibility issue in ``DatetimeIndex`` affecting architectures where ``numpy.int_`` defatuls to ``numpy.int32`` (:issue:`8943`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spelling: "defatuls"
In _generate_regular_range, we explicitly cast `periods` to np.int64 to prevent overflow in the function tseries.index._generate_regular_range. Note: we don't bother casting it for the function call generate_range since there's no danger of overflow in that function.
Sorry about the typo. OK, hopefully everything's in order now. |
Closes #8943: COMPAT: periods needs coercion to np.int64
Thanks @Garrett-R ! |
Let me know if this needs any work.
closes #8943