Skip to content

Commit b599990

Browse files
CLN: remove unused args/kwargs in BlockManager.reduce (#34818)
1 parent 4628665 commit b599990

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pandas/core/internals/managers.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -327,24 +327,24 @@ def _verify_integrity(self) -> None:
327327
f"tot_items: {tot_items}"
328328
)
329329

330-
def reduce(self, func, *args, **kwargs):
330+
def reduce(self, func):
331331
# If 2D, we assume that we're operating column-wise
332332
if self.ndim == 1:
333333
# we'll be returning a scalar
334334
blk = self.blocks[0]
335-
return func(blk.values, *args, **kwargs)
335+
return func(blk.values)
336336

337337
res = {}
338338
for blk in self.blocks:
339-
bres = func(blk.values, *args, **kwargs)
339+
bres = func(blk.values)
340340

341341
if np.ndim(bres) == 0:
342342
# EA
343343
assert blk.shape[0] == 1
344344
new_res = zip(blk.mgr_locs.as_array, [bres])
345345
else:
346346
assert bres.ndim == 1, bres.shape
347-
assert blk.shape[0] == len(bres), (blk.shape, bres.shape, args, kwargs)
347+
assert blk.shape[0] == len(bres), (blk.shape, bres.shape)
348348
new_res = zip(blk.mgr_locs.as_array, bres)
349349

350350
nr = dict(new_res)

0 commit comments

Comments
 (0)