Skip to content

BUG: timedelta64 + Timestamp raises #24775

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
jbrockmendel opened this issue Jan 14, 2019 · 0 comments · Fixed by #26916
Closed

BUG: timedelta64 + Timestamp raises #24775

jbrockmendel opened this issue Jan 14, 2019 · 0 comments · Fixed by #26916
Labels
Datetime Datetime data dtype Numeric Operations Arithmetic, Comparison, and Logical operations Timedelta Timedelta data type
Milestone

Comments

@jbrockmendel
Copy link
Member

>>> 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__

@TomAugspurger TomAugspurger added Datetime Datetime data dtype Numeric Operations Arithmetic, Comparison, and Logical operations Timedelta Timedelta data type labels Jan 15, 2019
jbrockmendel added a commit to jbrockmendel/pandas that referenced this issue Jun 18, 2019
@jreback jreback added this to the 0.25.0 milestone Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Numeric Operations Arithmetic, Comparison, and Logical operations Timedelta Timedelta data type
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants