|
28 | 28 | is_complex_dtype,
|
29 | 29 | is_datetime64_any_dtype,
|
30 | 30 | is_datetime64_ns_dtype,
|
31 |
| - is_datetime64tz_dtype, |
32 | 31 | is_datetimelike,
|
33 | 32 | is_extension_array_dtype,
|
34 | 33 | is_float_dtype,
|
35 | 34 | is_integer,
|
36 | 35 | is_integer_dtype,
|
37 |
| - is_interval_dtype, |
38 | 36 | is_list_like,
|
39 | 37 | is_numeric_dtype,
|
40 | 38 | is_object_dtype,
|
@@ -183,8 +181,6 @@ def _reconstruct_data(values, dtype, original):
|
183 | 181 |
|
184 | 182 | if is_extension_array_dtype(dtype):
|
185 | 183 | values = dtype.construct_array_type()._from_sequence(values)
|
186 |
| - elif is_datetime64tz_dtype(dtype) or is_period_dtype(dtype): |
187 |
| - values = Index(original)._shallow_copy(values, name=None) |
188 | 184 | elif is_bool_dtype(dtype):
|
189 | 185 | values = values.astype(dtype)
|
190 | 186 |
|
@@ -1645,19 +1641,13 @@ def take_nd(
|
1645 | 1641 | May be the same type as the input, or cast to an ndarray.
|
1646 | 1642 | """
|
1647 | 1643 |
|
1648 |
| - # TODO(EA): Remove these if / elifs as datetimeTZ, interval, become EAs |
1649 |
| - # dispatch to internal type takes |
1650 | 1644 | if is_extension_array_dtype(arr):
|
1651 | 1645 | return arr.take(indexer, fill_value=fill_value, allow_fill=allow_fill)
|
1652 |
| - elif is_datetime64tz_dtype(arr): |
1653 |
| - return arr.take(indexer, fill_value=fill_value, allow_fill=allow_fill) |
1654 |
| - elif is_interval_dtype(arr): |
1655 |
| - return arr.take(indexer, fill_value=fill_value, allow_fill=allow_fill) |
1656 | 1646 |
|
1657 | 1647 | if is_sparse(arr):
|
1658 | 1648 | arr = arr.to_dense()
|
1659 | 1649 | elif isinstance(arr, (ABCIndexClass, ABCSeries)):
|
1660 |
| - arr = arr.values |
| 1650 | + arr = arr._values |
1661 | 1651 |
|
1662 | 1652 | arr = np.asarray(arr)
|
1663 | 1653 |
|
|
0 commit comments