Skip to content

Commit 2d16863

Browse files
authored
PERF: Add type-hints in tzconversion.pyx (#55241)
1 parent b43d79d commit 2d16863

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc/source/whatsnew/v2.2.0.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ Performance improvements
238238
- Performance improvement in :meth:`DataFrame.sort_index` and :meth:`Series.sort_index` when indexed by a :class:`MultiIndex` (:issue:`54835`)
239239
- Performance improvement in :meth:`Index.difference` (:issue:`55108`)
240240
- Performance improvement when indexing with more than 4 keys (:issue:`54550`)
241-
-
241+
- Performance improvement when localizing time to UTC (:issue:`55241`)
242242

243243
.. ---------------------------------------------------------------------------
244244
.. _whatsnew_220.bug_fixes:

pandas/_libs/tslibs/tzconversion.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ cdef str _render_tstamp(int64_t val, NPY_DATETIMEUNIT creso):
462462

463463

464464
cdef _get_utc_bounds(
465-
ndarray vals,
465+
ndarray[int64_t] vals,
466466
int64_t* tdata,
467467
Py_ssize_t ntrans,
468468
const int64_t[::1] deltas,
@@ -472,7 +472,7 @@ cdef _get_utc_bounds(
472472
# result_a) or right of the DST transition (store in result_b)
473473

474474
cdef:
475-
ndarray result_a, result_b
475+
ndarray[int64_t] result_a, result_b
476476
Py_ssize_t i, n = vals.size
477477
int64_t val, v_left, v_right
478478
Py_ssize_t isl, isr, pos_left, pos_right

0 commit comments

Comments
 (0)