We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fd6de1d commit e2b0f49Copy full SHA for e2b0f49
pandas/core/indexes/base.py
@@ -505,12 +505,8 @@ def __new__(
505
if not copy and isinstance(data, (ABCSeries, Index)):
506
refs = data._references
507
508
- if isinstance(data, (ExtensionArray, np.ndarray)):
509
- # GH 63306
510
- if copy is not False:
511
- if dtype is None or astype_is_view(data.dtype, dtype):
512
- data = data.copy()
513
- copy = False
+ # GH 63306, GH 63388
+ data, copy = cls._maybe_copy_array_input(data, copy, dtype)
514
515
# range
516
if isinstance(data, (range, RangeIndex)):
0 commit comments