Skip to content

Commit

Permalink
add time to ufuncs
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Nov 15, 2021
1 parent c0a2a33 commit 7edb7f7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions py-polars/polars/datatypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,17 +192,15 @@ def dtype_to_ctype(dtype: Type[DataType]) -> Type[_SimpleCData]: # noqa: F821
ptr_type = ctypes.c_int8
elif dtype == Int16:
ptr_type = ctypes.c_int16
elif dtype == Int32:
elif dtype == Int32 or dtype == Date:
ptr_type = ctypes.c_int32
elif dtype == Int64:
ptr_type = ctypes.c_int64
elif dtype == Float32:
ptr_type = ctypes.c_float
elif dtype == Float64:
ptr_type = ctypes.c_double
elif dtype == Date:
ptr_type = ctypes.c_int32
elif dtype == Datetime:
elif dtype == Datetime or dtype == Time:
ptr_type = ctypes.c_int64
else:
raise NotImplementedError
Expand Down

0 comments on commit 7edb7f7

Please sign in to comment.