Skip to content

Adding tseries.offsets.Nano to other offsets throws error #9284

Closed
@tvyomkesh

Description

@tvyomkesh

xref #9226

In [11]: from pandas.tseries import offsets

In [12]: t1 = offsets.Nano(100)

In [13]: t2 = offsets.Micro(1)

In [14]: t3 = t1 + t2
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
 in ()
----> 1 t3 = t1 + t2

/Users/tvyomkesh/pandas/pandas/tseries/offsets.pyc in __add__(self, other)
   2025                 return type(self)(self.n + other.n)
   2026             else:
-> 2027                 return _delta_to_tick(self.delta + other.delta)
   2028         try:
   2029             return self.apply(other)

TypeError: ufunc add cannot use operands with types dtype('<m8[ns]') and dtype('O')

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions