Skip to content

CLN: assorted tslibs cleanups #34432

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 1 commit into from
May 28, 2020
Merged

Conversation

jbrockmendel
Copy link
Member

No description provided.

@@ -1325,7 +1325,7 @@ cdef class BusinessDay(BusinessMixin):
off_str += str(td.microseconds) + "us"
return off_str

if isinstance(self.offset, timedelta):
if PyDelta_Check(self.offset):
Copy link
Member

Choose a reason for hiding this comment

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

Cython doesn't optimize this automatically?
(and does this make a noticeable difference?)

Copy link
Member Author

Choose a reason for hiding this comment

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

cython does not do this automatically. it makes a small differnece, but enough that we do this in the rest of the cython code

Copy link
Member

Choose a reason for hiding this comment

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

OK

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah we use this type of check with datetime types a lot

@@ -1325,7 +1325,7 @@ cdef class BusinessDay(BusinessMixin):
off_str += str(td.microseconds) + "us"
return off_str

if isinstance(self.offset, timedelta):
if PyDelta_Check(self.offset):
Copy link
Contributor

Choose a reason for hiding this comment

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

yeah we use this type of check with datetime types a lot

@jreback jreback added Frequency DateOffsets Datetime Datetime data dtype labels May 28, 2020
@jreback jreback added this to the 1.1 milestone May 28, 2020
@jreback jreback merged commit 9223d19 into pandas-dev:master May 28, 2020
@jbrockmendel jbrockmendel deleted the cln-tslibs-4 branch May 28, 2020 21:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Frequency DateOffsets
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants