From c1d36044bd80e987105518a8986b016f7b54d584 Mon Sep 17 00:00:00 2001 From: William Ayd Date: Fri, 13 Oct 2023 12:32:41 -0400 Subject: [PATCH] Update get_utc declarations (#55507) * updated parameter definitions * revert memview -> ndarray declaration --- pandas/_libs/tslibs/tzconversion.pyx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pandas/_libs/tslibs/tzconversion.pyx b/pandas/_libs/tslibs/tzconversion.pyx index a96779aa33255..9c8865fbdf428 100644 --- a/pandas/_libs/tslibs/tzconversion.pyx +++ b/pandas/_libs/tslibs/tzconversion.pyx @@ -425,7 +425,11 @@ timedelta-like} return result.base # .base to get underlying ndarray -cdef Py_ssize_t bisect_right_i8(int64_t *data, int64_t val, Py_ssize_t n): +cdef Py_ssize_t bisect_right_i8( + const int64_t *data, + int64_t val, + Py_ssize_t n +) noexcept: # Caller is responsible for checking n > 0 # This looks very similar to local_search_right in the ndarray.searchsorted # implementation. @@ -463,7 +467,7 @@ cdef str _render_tstamp(int64_t val, NPY_DATETIMEUNIT creso): cdef _get_utc_bounds( ndarray[int64_t] vals, - int64_t* tdata, + const int64_t* tdata, Py_ssize_t ntrans, const int64_t[::1] deltas, NPY_DATETIMEUNIT creso,