Skip to content

Commit 657708b

Browse files
committed
fix ArrayManager.diff
1 parent 882f593 commit 657708b

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pandas/core/internals/array_manager.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,7 @@ def putmask(self: T, mask, new, align: bool = True) -> T:
363363
)
364364

365365
def diff(self: T, n: int, axis: int) -> T:
366-
axis = self._normalize_axis(axis)
367-
# Only reached with self.ndim == 2 and (normalized) axis == 0
366+
assert self.ndim == 2 and axis == 0 # caller ensures
368367
return self.apply(algos.diff, n=n, axis=axis)
369368

370369
def interpolate(self: T, **kwargs) -> T:

0 commit comments

Comments
 (0)