Skip to content

Commit 0c5e90e

Browse files
phoflcbpygit
authored andcommitted
CoW: Remove some no longer necessary todos (pandas-dev#56525)
1 parent e723d0f commit 0c5e90e

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

pandas/core/internals/managers.py

-5
Original file line numberDiff line numberDiff line change
@@ -1178,8 +1178,6 @@ def value_getitem(placement):
11781178
unfit_count = len(unfit_idxr)
11791179

11801180
new_blocks: list[Block] = []
1181-
# TODO(CoW) is this always correct to assume that the new_blocks
1182-
# are not referencing anything else?
11831181
if value_is_extension_type:
11841182
# This code (ab-)uses the fact that EA blocks contain only
11851183
# one item.
@@ -1377,7 +1375,6 @@ def insert(self, loc: int, item: Hashable, value: ArrayLike, refs=None) -> None:
13771375
value = ensure_block_shape(value, ndim=self.ndim)
13781376

13791377
bp = BlockPlacement(slice(loc, loc + 1))
1380-
# TODO(CoW) do we always "own" the passed `value`?
13811378
block = new_block_2d(values=value, placement=bp, refs=refs)
13821379

13831380
if not len(self.blocks):
@@ -1660,7 +1657,6 @@ def as_array(
16601657
"""
16611658
passed_nan = lib.is_float(na_value) and isna(na_value)
16621659

1663-
# TODO(CoW) handle case where resulting array is a view
16641660
if len(self.blocks) == 0:
16651661
arr = np.empty(self.shape, dtype=float)
16661662
return arr.transpose()
@@ -2198,7 +2194,6 @@ def _form_blocks(arrays: list[ArrayLike], consolidate: bool, refs: list) -> list
21982194

21992195
# when consolidating, we can ignore refs (either stacking always copies,
22002196
# or the EA is already copied in the calling dict_to_mgr)
2201-
# TODO(CoW) check if this is also valid for rec_array_to_mgr
22022197

22032198
# group by dtype
22042199
grouper = itertools.groupby(tuples, _grouping_func)

0 commit comments

Comments
 (0)