-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Use pandas_datetimestruct instead of date_info #19874
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
pandas/_libs/tslibs/period.pyx
Outdated
|
||
|
||
cdef inline int max_value(int left, int right) nogil: | ||
# Cython doesn't support "max(...)" in nogil blocks |
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.
this is defined in multiple places in the code add already
Codecov Report
@@ Coverage Diff @@
## master #19874 +/- ##
=========================================
Coverage ? 91.67%
=========================================
Files ? 150
Lines ? 48946
Branches ? 0
=========================================
Hits ? 44870
Misses ? 4076
Partials ? 0
Continue to review full report at Codecov.
|
pandas/_libs/tslibs/period.pyx
Outdated
|
||
if ordinal == iNaT: | ||
return iNaT | ||
|
||
if end: | ||
retval = asfreq(ordinal, freq1, freq2, END) |
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.
use ? :
or jut make the if/else include the function (simpler)
pandas/_libs/tslibs/period.pyx
Outdated
|
||
if retval == INT32_MIN: | ||
raise ValueError('Frequency conversion failed') | ||
|
||
return retval | ||
|
||
|
||
cdef void get_asfreq_info(int from_freq, int to_freq, | ||
char relation, asfreq_info *af_info) nogil: | ||
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 add doc-strings
|
||
npy_int64 get_daytime_conversion_factor(int from_index, int to_index); | ||
int max_value(int a, int b); |
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.
really? ok, need to fix this up later. too much duplicated floating around, but I guess when this is fully cythonized can remove this.
thanks. |
Changes test file name from previous pass