@@ -74,6 +74,8 @@ cdef inline int64_t get_datetime64_nanos(object val) except? -1:
7474 return ival
7575
7676
77+ @ cython.boundscheck (False )
78+ @ cython.wraparound (False )
7779def ensure_datetime64ns (arr: ndarray , copy: bint = True ):
7880 """
7981 Ensure a np.datetime64 array has dtype specifically 'datetime64[ns]'
@@ -138,6 +140,8 @@ def ensure_timedelta64ns(arr: ndarray, copy: bint = True):
138140 # TODO: check for overflows when going from a lower-resolution to nanos
139141
140142
143+ @ cython.boundscheck (False )
144+ @ cython.wraparound (False )
141145def datetime_to_datetime64 (values: object[:]):
142146 """
143147 Convert ndarray of datetime-like objects to int64 array representing
@@ -611,6 +615,8 @@ cpdef inline datetime localize_pydatetime(datetime dt, object tz):
611615# ----------------------------------------------------------------------
612616# Timezone Conversion
613617
618+ @ cython.boundscheck (False )
619+ @ cython.wraparound (False )
614620cdef inline int64_t[:] _tz_convert_dst(int64_t[:] values, tzinfo tz,
615621 bint to_utc = True ):
616622 """
@@ -757,6 +763,8 @@ cpdef int64_t tz_convert_single(int64_t val, object tz1, object tz2):
757763 return _tz_convert_dst(arr, tz2, to_utc = False )[0 ]
758764
759765
766+ @ cython.boundscheck (False )
767+ @ cython.wraparound (False )
760768cdef inline int64_t[:] _tz_convert_one_way(int64_t[:] vals, object tz,
761769 bint to_utc):
762770 """
@@ -1215,6 +1223,8 @@ cdef inline int64_t _normalized_stamp(npy_datetimestruct *dts) nogil:
12151223 return dtstruct_to_dt64(dts)
12161224
12171225
1226+ @ cython.boundscheck (False )
1227+ @ cython.wraparound (False )
12181228def is_date_array_normalized (int64_t[:] stamps , object tz = None ):
12191229 """
12201230 Check if all of the given (nanosecond) timestamps are normalized to
0 commit comments