Skip to content

Commit

Permalink
PERF: Add type-hints in tzconversion.pyx (#55241)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhshadrach authored Sep 22, 2023
1 parent b43d79d commit 2d16863
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v2.2.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ Performance improvements
- Performance improvement in :meth:`DataFrame.sort_index` and :meth:`Series.sort_index` when indexed by a :class:`MultiIndex` (:issue:`54835`)
- Performance improvement in :meth:`Index.difference` (:issue:`55108`)
- Performance improvement when indexing with more than 4 keys (:issue:`54550`)
-
- Performance improvement when localizing time to UTC (:issue:`55241`)

.. ---------------------------------------------------------------------------
.. _whatsnew_220.bug_fixes:
Expand Down
4 changes: 2 additions & 2 deletions pandas/_libs/tslibs/tzconversion.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -462,7 +462,7 @@ cdef str _render_tstamp(int64_t val, NPY_DATETIMEUNIT creso):


cdef _get_utc_bounds(
ndarray vals,
ndarray[int64_t] vals,
int64_t* tdata,
Py_ssize_t ntrans,
const int64_t[::1] deltas,
Expand All @@ -472,7 +472,7 @@ cdef _get_utc_bounds(
# result_a) or right of the DST transition (store in result_b)

cdef:
ndarray result_a, result_b
ndarray[int64_t] result_a, result_b
Py_ssize_t i, n = vals.size
int64_t val, v_left, v_right
Py_ssize_t isl, isr, pos_left, pos_right
Expand Down

0 comments on commit 2d16863

Please sign in to comment.