Skip to content

REF: de-duplicate month_offset in tslibs.fields #35073

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

Merged
merged 3 commits into from
Jul 1, 2020

Conversation

jbrockmendel
Copy link
Member

No description provided.

@jreback jreback added Clean Datetime Datetime data dtype labels Jul 1, 2020
@jreback jreback added this to the 1.1 milestone Jul 1, 2020
@jreback jreback merged commit 559189a into pandas-dev:master Jul 1, 2020
@@ -27,7 +27,7 @@ cdef int* sakamoto_arr = [0, 3, 2, 5, 0, 3, 5, 1, 4, 6, 2, 4]
# The first 13 entries give the month days elapsed as of the first of month N
# (or the total number of days in the year for N=13) in non-leap years.
# The remaining 13 entries give the days elapsed in leap years.
cdef int32_t* _month_offset = [
cdef int32_t* month_offset = [
Copy link
Member

@mroeschke mroeschke Jul 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe an optimization for the future. But we can maybe remove half the values and have the calls just do:

month_offset[month_index] + int(month > 1)

@jbrockmendel jbrockmendel deleted the ref-month_offset branch July 1, 2020 00:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Datetime Datetime data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants