Skip to content

Commit de9e29f

Browse files
author
Christopher Doris
committed
docs(numpydates): add numpy.datetime64 and numpy.timedelta64 conversions
Add mapping entries for numpy.datetime64 and numpy.timedelta64 in conversion-to-julia.md. Document conversion to NumpyDates types and inline/Dates fallbacks to clarify behavior when passing numpy date/time objects from Python.
1 parent 350171e commit de9e29f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

docs/src/conversion-to-julia.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ From Python, the arguments to a Julia function will be converted according to th
3131
| `datetime.date`/`datetime.time`/`datetime.datetime` | `Date`/`Time`/`DateTime` |
3232
| `datetime.timedelta` | `Microsecond` (or `Millisecond` or `Second` on overflow) |
3333
| `numpy.intXX`/`numpy.uintXX`/`numpy.floatXX` | `IntXX`/`UIntXX`/`FloatXX` |
34+
| `numpy.datetime64` | `NumpyDates.DateTime64` |
35+
| `numpy.timedelta64` | `NumpyDates.TimeDelta64` |
3436
| **Standard priority (other reasonable conversions).** | |
3537
| `None` | `Missing` |
3638
| `bytes` | `Vector{UInt8}`, `Vector{Int8}`, `String` |
@@ -48,6 +50,8 @@ From Python, the arguments to a Julia function will be converted according to th
4850
| `ctypes.c_char_p` | `Cstring`, `Ptr{Cchar}`, `Ptr` |
4951
| `ctypes.c_wchar_p` | `Cwstring`, `Ptr{Cwchar}`, `Ptr` |
5052
| `numpy.bool_`/`numpy.intXX`/`numpy.uintXX`/`numpy.floatXX` | `Bool`, `Integer`, `Rational`, `Real`, `Number` |
53+
| `numpy.datetime64` | `NumpyDates.InlineDateTime64`, `Dates.DateTime` |
54+
| `numpy.timedelta64` | `NumpyDates.InlineTimeDelta64`, `Dates.Period` |
5155
| Objects satisfying the buffer or array interface | `Array`, `AbstractArray` |
5256
| **Low priority (fallback to `Py`).** | |
5357
| Anything | `Py` |

0 commit comments

Comments
 (0)