BUG: fix tz-aware DatetimeIndex + TimedeltaIndex (#17558)
State: closed

Fix a bug that was causing a tz-aware DatetimeIndex + TimedeltaIndex to raise an error. (An internal function was documented to return an integer view, but instead was trying to use the DatetimeIndex's dtype.) Fix another bug causing the sum of a tz-aware DatetimeIndex and a numpy array of timedeltas to incorrectly have timezone applied twice, by adding another case in `DatetimeIndex.__add__`.

- [x] closes #17558 
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Bug
name: Timezones
description: Timezone data dtype

Comments:
Hello @azjps! Thanks for updating the PR.













Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on September 20, 2017 at 00:50 Hours UTC
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17583?src=pr&el=h1) Report
> Merging [#17583](https://codecov.io/gh/pandas-dev/pandas/pull/17583?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/21a38008e3cab7a0459cce4fab4ace11379c3148?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `100%`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/17583/graphs/tree.svg?height=150&src=pr&token=eZ4WkYLtcO&width=650)](https://codecov.io/gh/pandas-dev/pandas/pull/17583?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #17583      +/-   ##
==========================================
+ Coverage   91.19%    91.2%   +<.01%     
==========================================
  Files         163      163              
  Lines       49626    49638      +12     
==========================================
+ Hits        45258    45270      +12     
  Misses       4368     4368
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `88.98% <100%> (+0.02%)` | :arrow_up: |
| #single | `40.18% <0%> (-0.08%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/17583?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/17583?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZWxpa2UucHk=) | `96.94% <100%> (+0.05%)` | :arrow_up: |
| [pandas/core/indexes/period.py](https://codecov.io/gh/pandas-dev/pandas/pull/17583?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9wZXJpb2QucHk=) | `94.22% <100%> (+1.44%)` | :arrow_up: |
| [pandas/core/indexes/datetimes.py](https://codecov.io/gh/pandas-dev/pandas/pull/17583?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZXMucHk=) | `95.54% <100%> (ø)` | :arrow_up: |
| [pandas/core/indexes/timedeltas.py](https://codecov.io/gh/pandas-dev/pandas/pull/17583?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy90aW1lZGVsdGFzLnB5) | `91.22% <100%> (+0.03%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/17583?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/17583?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.77% <0%> (-0.1%)` | :arrow_down: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17583?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/17583?src=pr&el=footer). Last update [21a3800...92bf771](https://codecov.io/gh/pandas-dev/pandas/pull/17583?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

can you rebase and move the note to 0.21.1
can you rebase / update. we have slightly better testing in place now FYI.
closing as stale