BUG: Fix IntervalIndex constructor inconsistencies
State: closed

- [X] closes #18421
- [X] tests added / passed
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] whatsnew entry

Regarding item 3) in the issue, which deals with the dtype of `IntervalIndex([])`:  I implemented this so that the default behavior is to have `object` dtype.  However, if the empty data has a specific dtype, e.g. `np.array([], dtype='int64')`, it will use that dtype instead.

Labels:
name: Bug
name: Interval
description: Interval data type

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18424?src=pr&el=h1) Report
> Merging [#18424](https://codecov.io/gh/pandas-dev/pandas/pull/18424?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/fedc503f0d25b04850a931398fc0556d892d69ea?src=pr&el=desc) will **decrease** coverage by `0.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #18424      +/-   ##
==========================================
- Coverage   91.35%   91.34%   -0.02%     
==========================================
  Files         163      163              
  Lines       49691    49700       +9     
==========================================
+ Hits        45397    45398       +1     
- Misses       4294     4302       +8
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `89.14% <100%> (ø)` | :arrow_up: |
| #single | `39.67% <11.53%> (-0.07%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/18424?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/indexes/interval.py](https://codecov.io/gh/pandas-dev/pandas/pull/18424?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9pbnRlcnZhbC5weQ==) | `92.64% <100%> (+0.11%)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/18424?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `25% <0%> (-58.34%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/18424?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.8% <0%> (-0.1%)` | :arrow_down: |
| [pandas/core/dtypes/cast.py](https://codecov.io/gh/pandas-dev/pandas/pull/18424?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Nhc3QucHk=) | `88.59% <0%> (+0.17%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/18424?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/18424?src=pr&el=footer). Last update [fedc503...42c15fa](https://codecov.io/gh/pandas-dev/pandas/pull/18424?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

lgtm. @jschendel ready?
@jreback : this should be ready to merge.  Was going to add tz aware related tests, but there are still a few tz aware things that are broken (e.g. `IntervalIndex.mid`) that should probably be done in a separate PR to keep things clean.  
> @jreback : this should be ready to merge. Was going to add tz aware related tests, but there are still a few tz aware things that are broken (e.g. IntervalIndex.mid) that should probably be done in a separate PR to keep things clean.

sgtm.
thanks @jschendel nice PRs. keep em coming!