-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: handle immutable arrays in tz_convert_from_utc (#35530) #35532
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
4b09568
to
f60c88f
Compare
Seems reasonable; not sure if CI failure was related so restarted |
small comments, otherwise lgtm |
pandas/_libs/tslibs/tzconversion.pyx
Outdated
@@ -457,7 +457,7 @@ cdef int64_t[:] _tz_convert_from_utc(int64_t[:] vals, tzinfo tz): | |||
str typ | |||
|
|||
if is_utc(tz): | |||
converted = vals | |||
return vals |
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.
doesnt need to be this PR, but might be convenient: i think this should probably return a copy, not the original array.
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.
I agree this should be a copy, can you update @lidavidm otherwise lgtm. pls ping on green.
Changed to be a copy (which also lets us remove the const specifiers pointed out), CI green! |
LGTM |
Thanks @lidavidm |
Thank you for the review! |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff