We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0cdaa71 commit 323ed9bCopy full SHA for 323ed9b
pandas/core/internals/array_manager.py
@@ -834,17 +834,15 @@ def iset(
834
835
# multiple columns -> convert slice or array to integer indices
836
elif isinstance(loc, slice):
837
- indices = range(
+ indices: range | np.ndarray = range(
838
loc.start if loc.start is not None else 0,
839
loc.stop if loc.stop is not None else self.shape_proper[1],
840
loc.step if loc.step is not None else 1,
841
)
842
else:
843
assert isinstance(loc, np.ndarray)
844
assert loc.dtype == "bool"
845
- # error: Incompatible types in assignment (expression has type "ndarray",
846
- # variable has type "range")
847
- indices = np.nonzero(loc)[0] # type: ignore[assignment]
+ indices = np.nonzero(loc)[0]
848
849
assert value.ndim == 2
850
assert value.shape[0] == len(self._axes[0])
0 commit comments