Skip to content

BUG: timedelta64 + Timestamp raises #24775

Closed
@jbrockmendel

Description

@jbrockmendel
>>> np.timedelta64(3600*10**9, 'ns') + pd.Timestamp.now()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: ufunc add cannot use operands with types dtype('<m8[ns]') and dtype('O')

I think we can fix this by defining Timestamp.__array_priority__

Metadata

Metadata

Assignees

No one assigned

    Labels

    DatetimeDatetime data dtypeNumeric OperationsArithmetic, Comparison, and Logical operationsTimedeltaTimedelta data type

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions