Skip to content

Commit 5332a8d

Browse files
authored
CLN: remove no-longer-used (#43200)
1 parent c979bd8 commit 5332a8d

File tree

1 file changed

+1
-44
lines changed

1 file changed

+1
-44
lines changed

pandas/core/internals/managers.py

+1-44
Original file line numberDiff line numberDiff line change
@@ -1859,7 +1859,7 @@ def construction_error(
18591859
# -----------------------------------------------------------------------
18601860

18611861

1862-
def _grouping_func(tup):
1862+
def _grouping_func(tup: tuple[int, ArrayLike]) -> tuple[bool, DtypeObj]:
18631863
# compat for numpy<1.21, in which comparing a np.dtype with an ExtensionDtype
18641864
# raises instead of returning False. Once earlier numpy versions are dropped,
18651865
# this can be simplified to `return tup[1].dtype`
@@ -1911,49 +1911,6 @@ def _form_blocks(arrays: list[ArrayLike], consolidate: bool) -> list[Block]:
19111911
return nbs
19121912

19131913

1914-
def simple_blockify(tuples, dtype, consolidate: bool) -> list[Block]:
1915-
"""
1916-
return a single array of a block that has a single dtype; if dtype is
1917-
not None, coerce to this dtype
1918-
"""
1919-
if not consolidate:
1920-
return _tuples_to_blocks_no_consolidate(tuples, dtype=dtype)
1921-
1922-
values, placement = _stack_arrays(tuples, dtype)
1923-
1924-
# TODO: CHECK DTYPE?
1925-
if dtype is not None and values.dtype != dtype: # pragma: no cover
1926-
values = values.astype(dtype)
1927-
1928-
block = new_block(values, placement=BlockPlacement(placement), ndim=2)
1929-
return [block]
1930-
1931-
1932-
def multi_blockify(tuples, dtype: DtypeObj | None = None, consolidate: bool = True):
1933-
"""return an array of blocks that potentially have different dtypes"""
1934-
1935-
if not consolidate:
1936-
return _tuples_to_blocks_no_consolidate(tuples, dtype=dtype)
1937-
1938-
# group by dtype
1939-
grouper = itertools.groupby(tuples, lambda x: x[1].dtype)
1940-
1941-
new_blocks = []
1942-
for dtype, tup_block in grouper:
1943-
1944-
# error: Argument 2 to "_stack_arrays" has incompatible type
1945-
# "Union[ExtensionDtype, str, dtype[Any], Type[str], Type[float], Type[int],
1946-
# Type[complex], Type[bool], Type[object], None]"; expected "dtype[Any]"
1947-
values, placement = _stack_arrays(
1948-
list(tup_block), dtype # type: ignore[arg-type]
1949-
)
1950-
1951-
block = new_block(values, placement=BlockPlacement(placement), ndim=2)
1952-
new_blocks.append(block)
1953-
1954-
return new_blocks
1955-
1956-
19571914
def _tuples_to_blocks_no_consolidate(tuples, dtype: DtypeObj | None) -> list[Block]:
19581915
# tuples produced within _form_blocks are of the form (placement, array)
19591916
if dtype is not None:

0 commit comments

Comments
 (0)