We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6eb74a6 commit ba0fd9cCopy full SHA for ba0fd9c
pandas/core/indexers.py
@@ -31,7 +31,7 @@ def is_scalar_indexer(indexer, arr_value) -> bool:
31
Returns
32
-------
33
bool
34
- True if X are all scalar indexers.
+ True if we are all scalar indexers.
35
"""
36
if arr_value.ndim == 1:
37
if not isinstance(indexer, tuple):
@@ -143,11 +143,11 @@ def validate_indices(indices: np.ndarray, n: int) -> None:
143
if len(indices):
144
min_idx = indices.min()
145
if min_idx < -1:
146
- raise ValueError(
147
- f"'indices' contains values less than allowed ({min_idx} < -1)"
148
- )
+ msg = f"'indices' contains values less than allowed ({min_idx} < -1)"
+ raise ValueError(msg)
149
150
max_idx = indices.max()
+
151
if max_idx >= n:
152
raise IndexError("indices are out-of-bounds")
153
0 commit comments