Skip to content

Commit

Permalink
Promote type in DateTimeIndex.microsecond as well
Browse files Browse the repository at this point in the history
  • Loading branch information
wence- committed Nov 14, 2022
1 parent 5af7e63 commit e55c9f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/cudf/cudf/core/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -2072,7 +2072,10 @@ def microsecond(self):
""" # noqa: E501
return as_index(
(
self._values.get_dt_field("millisecond")
# Need to manually promote column to int32 because
# pandas-matching binop behaviour requires that this
# __mul__ returns an int16 column.
self._values.get_dt_field("millisecond").astype("int32")
* cudf.Scalar(1000, dtype="int32")
)
+ self._values.get_dt_field("microsecond"),
Expand Down

0 comments on commit e55c9f0

Please sign in to comment.