@@ -93,6 +93,14 @@ cpdef int64_t pydt_to_i8(object pydt) except? -1:
93
93
"""
94
94
Convert to int64 representation compatible with numpy datetime64; converts
95
95
to UTC
96
+
97
+ Parameters
98
+ ----------
99
+ pydt : object
100
+
101
+ Returns
102
+ -------
103
+ i8value : np.int64
96
104
"""
97
105
cdef:
98
106
_TSObject ts
@@ -806,6 +814,11 @@ def date_normalize(ndarray[int64_t] stamps, tz=None):
806
814
rounding down to the beginning of the day (i.e. midnight). If `tz`
807
815
is not None, then this is midnight for this timezone.
808
816
817
+ Parameters
818
+ ----------
819
+ stamps : int64 ndarray
820
+ tz : tzinfo or None
821
+
809
822
Returns
810
823
-------
811
824
result : int64 ndarray of converted of normalized nanosecond timestamps
@@ -838,6 +851,11 @@ cdef ndarray[int64_t] _normalize_local(ndarray[int64_t] stamps, object tz):
838
851
rounding down to the beginning of the day (i.e. midnight) for the
839
852
given timezone `tz`.
840
853
854
+ Parameters
855
+ ----------
856
+ stamps : int64 ndarray
857
+ tz : tzinfo or None
858
+
841
859
Returns
842
860
-------
843
861
result : int64 ndarray of converted of normalized nanosecond timestamps
@@ -897,6 +915,17 @@ cdef ndarray[int64_t] _normalize_local(ndarray[int64_t] stamps, object tz):
897
915
898
916
899
917
cdef inline int64_t _normalized_stamp(pandas_datetimestruct * dts) nogil:
918
+ """
919
+ Normalize the given datetimestruct to midnight, then convert to int64_t.
920
+
921
+ Parameters
922
+ ----------
923
+ *dts : pointer to pandas_datetimestruct
924
+
925
+ Returns
926
+ -------
927
+ stamp : int64
928
+ """
900
929
dts.hour = 0
901
930
dts.min = 0
902
931
dts.sec = 0
@@ -911,9 +940,14 @@ def is_date_array_normalized(ndarray[int64_t] stamps, tz=None):
911
940
midnight, i.e. hour == minute == second == 0. If the optional timezone
912
941
`tz` is not None, then this is midnight for this timezone.
913
942
943
+ Parameters
944
+ ----------
945
+ stamps : int64 ndarray
946
+ tz : tzinfo or None
947
+
914
948
Returns
915
949
-------
916
- is_normalizaed : bool True if all stamps are normalized
950
+ is_normalized : bool True if all stamps are normalized
917
951
"""
918
952
cdef:
919
953
Py_ssize_t i, n = len (stamps)
0 commit comments