From f10a8dc31ece7aa2d23a5c8948f160d9594d59ec Mon Sep 17 00:00:00 2001 From: Alexander Druz Date: Fri, 27 Oct 2023 13:29:21 +0200 Subject: [PATCH] Convert numpy datetimes to us --- renumics/spotlight/dtypes/conversion.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/renumics/spotlight/dtypes/conversion.py b/renumics/spotlight/dtypes/conversion.py index c5b7cc12..6e53dca2 100644 --- a/renumics/spotlight/dtypes/conversion.py +++ b/renumics/spotlight/dtypes/conversion.py @@ -245,7 +245,7 @@ def _(value: Union[str, np.str_], _: dtypes.DType) -> Optional[datetime.datetime @convert("datetime") def _(value: np.datetime64, _: dtypes.DType) -> Optional[datetime.datetime]: - return value.tolist() + return value.astype("datetime64[us]").tolist() @convert("Category")