-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
REF: implement shift_bday #34761
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
REF: implement shift_bday #34761
Conversation
@@ -3991,6 +3974,51 @@ def shift_months(const int64_t[:] dtindex, int months, object day=None): | |||
return np.asarray(out) | |||
|
|||
|
|||
cdef ndarray[int64_t] shift_bdays(const int64_t[:] i8other, int periods): | |||
cdef: |
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.
can you doc-string args
if val == NPY_NAT: | ||
result[i] = NPY_NAT | ||
else: | ||
# The rest of this is effectively a copy of BusinessDay.apply |
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.
TODO here to consolidate?
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.
not really feasible; different types.
Avoids depending on DatetimeArray/PeriodArray methods, also avoids a couple of array allocations