8000 Merge pull request #25939 from F3eQnxN3RriK/doc-patch-1 · andyfaff/numpy@341ef66 · GitHub
[go: up one dir, main page]

Skip to content

Commit 341ef66

Browse files
authored
Merge pull request numpy#25939 from F3eQnxN3RriK/doc-patch-1
DOC: Add entries of ``npy_datetime`` and ``npy_timedelta``
2 parents 8b0bc6d + d83463c commit 341ef66

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

doc/source/reference/c-api/datetimes.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ objects in C.
1010
Data types
1111
----------
1212

13-
In addition to the `npy_datetime` and `npy_timedelta` typedefs for `npy_int64`,
14-
NumPy defines two additional structs that represent time unit metadata and
15-
an "exploded" view of a datetime.
13+
In addition to the :c:type:`npy_datetime` and :c:type:`npy_timedelta` typedefs
14+
for :c:type:`npy_int64`, NumPy defines two additional structs that represent
15+
time unit metadata and an "exploded" view of a datetime.
1616

1717
.. c:type:: PyArray_DatetimeMetaData
1818
@@ -181,7 +181,7 @@ Conversion functions
181181
182182
``out_bestunit`` gives a suggested unit based on the amount of
183183
resolution provided in the string, or -1 for NaT.
184-
184+
185185
``out_special`` gets set to 1 if the parsed time was 'today',
186186
'now', empty string, or 'NaT'. For 'today', the unit recommended is
187187
'D', for 'now', the unit recommended is 's', and for 'NaT'

doc/source/reference/c-api/dtype.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,18 @@ bit-widths are available is platform dependent. The bolded bit-widths
455455
are usually available on all platforms.
456456

457457

458+
Time and timedelta
459+
~~~~~~~~~~~~~~~~~~
460+
461+
.. c:type:: npy_datetime
462+
463+
date or datetime (alias of :c:type:`npy_int64`)
464+
465+
.. c:type:: npy_timedelta
466+
467+
length of time (alias of :c:type:`npy_int64`)
468+
469+
458470
Printf formatting
459471
-----------------
460472

0 commit comments

Comments
 (0)
0