Issue 1:
Code Sample, a copy-pastable example if possible

import pandas as pd

dates = pd.date_range('2017-01-01', '2017-01-31', tz='UTC')
deltas = pd.TimedeltaIndex(pd.np.arange(0, len(dates)), unit='m')
dates + deltas

# Removing the tz='UTC' (making dates tz naive) works

throws:

TypeError Traceback (most recent call last)
<ipython-input-28-708df3869f57> in <module>()
3 dates = pd.date_range('2017-01-01', '2017-01-31', tz='UTC')
4 deltas = pd.TimedeltaIndex(pd.np.arange(0, len(dates)), unit='m')
----> 5 dates + deltas

~/miniconda/lib/python3.6/site-packages/pandas/core/indexes/datetimelike.py in __add__(self, other)
643 from pandas.tseries.offsets import DateOffset
644 if isinstance(other, TimedeltaIndex):
--> 645 return self._add_delta(other)
646 elif isinstance(self, TimedeltaIndex) and isinstance(other, Index):
647 if hasattr(other, '_add_delta'):

~/miniconda/lib/python3.6/site-packages/pandas/core/indexes/datetimes.py in _add_delta(self, delta)
814 new_values = self._add_delta_td(delta)
815 elif isinstance(delta, TimedeltaIndex):
--> 816 new_values = self._add_delta_tdi(delta)
817 # update name when delta is Index
818 name = com._maybe_match_name(self, delta)

~/miniconda/lib/python3.6/site-packages/pandas/core/indexes/datetimelike.py in _add_delta_tdi(self, other)
727 mask = (self._isnan) | (other._isnan)
728 new_values[mask] = iNaT
--> 729 return new_values.view(self.dtype)
730
731 def isin(self, values):

TypeError: data type not understood

Problem description

Adding TimedeltaIndex to timezone-aware DatetimeIndex throws a TypeError. The error goes away if the DatetimeIndex does not have a timezone.

(I vaguely remember seeing an issue on this, but can't seem to find it now when I search.)

Output of pd.show_versions()

INSTALLED VERSIONS

commit: None

python: 3.6.2.final.0

python-bits: 64

OS: Linux

OS-release: 4.10.0-33-generic

machine: x86_64

processor: x86_64

byteorder: little

LC_ALL: C.UTF-8

LANG: C.UTF-8

LOCALE: en_US.UTF-8

pandas: 0.21.0

pytest: None

pip: 9.0.1

setuptools: 36.5.0.post20170921

Cython: None

numpy: 1.13.3

scipy: 0.19.1

pyarrow: None

xarray: None

IPython: 6.2.1

sphinx: None

patsy: None

dateutil: 2.6.1

pytz: 2017.3

blosc: None

bottleneck: None

tables: 3.4.2

numexpr: 2.6.4

feather: None

matplotlib: 2.1.0

openpyxl: None

xlrd: 1.0.0

xlwt: None

xlsxwriter: None

lxml: None

bs4: 4.6.0

html5lib: 0.9999999

sqlalchemy: None

pymysql: None

psycopg2: None

jinja2: 2.10

s3fs: None

fastparquet: None

pandas_gbq: None

pandas_datareader: None

Issue 2:
Code Sample, a copy-pastable example if possible

In [1]: import numpy as np, pandas as pd

In [2]: dt = pd.DatetimeIndex([pd.Timestamp("2017/01/01")], tz='US/Eastern') # dtype=datetime64[ns, US/Eastern]

In [3]: td_np = np.array([np.timedelta64(1, 'ns')]) # dtype="timedelta64[ns]"

In [4]: (dt + td_np).values # Bad, "applies" TZ twice to get 10:00 instead of 05:00!
Out[4]: array(['2017-01-01T10:00:00.000000001'], dtype='datetime64[ns]')

In [5]: (dt + td_np[0]).values
Out[5]: array(['2017-01-01T05:00:00.000000001'], dtype='datetime64[ns]')

In [6]: (dt + pd.Series(td_np)).values
Out[6]: array(['2017-01-01T05:00:00.000000001'], dtype='datetime64[ns]')

In [7]: (dt.tz_convert(None) + td_np).values
Out[7]: array(['2017-01-01T05:00:00.000000001'], dtype='datetime64[ns]')

In [8]: (dt.values + td_np)
Out[8]: array(['2017-01-01T05:00:00.000000001'], dtype='datetime64[ns]')

In [9]: (dt + pd.TimedeltaIndex(td_np))
TypeError: data type not understood

Problem description

(Above is run on 0.20.3) When adding a tz-aware DatetimeIndex and a numpy array of timedeltas, the result incorrectly has the timezone applied twice. There are several related issues on tz-aware DatetimeIndex and timedelta sums on the issue tracker, for example #14022. However, as far as I've read, those issues appear to have been mostly resolved as of ~0.19; this case just slipped through the cracks. I haven't found any other variants of this bug, except maybe that tz-aware DatetimeIndex + TimedeltaIndex raises an exception.

(Just for context, I am not relying on this behavior, just happened to come across it while updating some tests to use pandas 0.20.3, but it could lead to someone silently getting incorrect results.)

I think all that needs to be fixed here is to add another case in pd.DatetimeIndex[OpsMixin].__add__ to handle any array-like with dtype=timedelta64[..]. (Maybe there's a more general upstream solution?) If someone confirms I can submit a patch.

Expected Output

In [4]: (dt + td_np).values
Out[5]: array(['2017-01-01T05:00:00.000000001'], dtype='datetime64[ns]')

Output of pd.show_versions()

INSTALLED VERSIONS
------------------
commit: None
python: 2.7.6.final.0
python-bits: 64
OS: Linux
OS-release: 4.4.75-el6.x86_64.lime.1
machine: x86_64
processor: x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8
LOCALE: None.None

pandas: 0.20.3

pytest: 2.9.1

pip: 7.1.0

setuptools: 19.4

Cython: 0.24

numpy: 1.13.1

scipy: 0.17.0

xarray: None

IPython: 5.1.0

sphinx: 1.4.5

patsy: 0.4.1

dateutil: 2.2

pytz: 2015.2

blosc: None

bottleneck: None

tables: None

numexpr: None

feather: None

matplotlib: 1.5.3

openpyxl: 1.8.6

xlrd: 0.9.3

xlwt: None

xlsxwriter: None

lxml: 3.6.0

bs4: 4.4.0

html5lib: None

sqlalchemy: 1.0.12

pymysql: 0.6.3.None

psycopg2: None

jinja2: 2.9.6

s3fs: None

pandas_gbq: None

pandas_datareader: None