Skip to content

CLN: remove _has_complex_internals #43533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions pandas/core/groupby/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,9 +435,6 @@ def _aggregate_named(self, func, *args, **kwargs):
initialized = False

for name, group in self:
# Each step of this loop corresponds to
# libreduction._BaseGrouper._apply_to_group
# NB: libreduction does not pin name
object.__setattr__(group, "name", name)

output = func(group, *args, **kwargs)
Expand Down
8 changes: 0 additions & 8 deletions pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -4696,14 +4696,6 @@ def _require_scalar(self, value):
raise TypeError(f"'value' must be a scalar, passed: {type(value).__name__}")
return value

@property
def _has_complex_internals(self) -> bool:
"""
Indicates if an index is not directly backed by a numpy array
"""
# used to avoid libreduction code paths, which raise or require conversion
return False

def _is_memory_usage_qualified(self) -> bool:
"""
Return a boolean if we need a qualified .info display.
Expand Down
5 changes: 0 additions & 5 deletions pandas/core/indexes/datetimelike.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,11 +548,6 @@ def _with_freq(self, freq):
arr = self._data._with_freq(freq)
return type(self)._simple_new(arr, name=self._name)

@property
def _has_complex_internals(self) -> bool:
# used to avoid libreduction code paths, which raise or require conversion
return True

def is_type_compatible(self, kind: str) -> bool:
warnings.warn(
f"{type(self).__name__}.is_type_compatible is deprecated and will be "
Expand Down
5 changes: 0 additions & 5 deletions pandas/core/indexes/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,6 @@ def _simple_new(
__truediv__ = _make_wrapped_arith_op("__truediv__")
__rtruediv__ = _make_wrapped_arith_op("__rtruediv__")

@property
def _has_complex_internals(self) -> bool:
# used to avoid libreduction code paths, which raise or require conversion
return True

# ---------------------------------------------------------------------
# NDarray-Like Methods

Expand Down
5 changes: 0 additions & 5 deletions pandas/core/indexes/multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -1543,11 +1543,6 @@ def _get_level_number(self, level) -> int:
) from err
return level

@property
def _has_complex_internals(self) -> bool:
# used to avoid libreduction code paths, which raise or require conversion
return True

@cache_readonly
def is_monotonic_increasing(self) -> bool:
"""
Expand Down