Skip to content

Commit a3ce35a

Browse files
authored
CLN: rename confusing variable name (#51690)
1 parent e1a42f3 commit a3ce35a

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pandas/_libs/algos.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -752,7 +752,7 @@ def is_monotonic(ndarray[numeric_object_t, ndim=1] arr, bint timelike):
752752
tuple
753753
is_monotonic_inc : bool
754754
is_monotonic_dec : bool
755-
is_unique : bool
755+
is_strict_monotonic : bool
756756
"""
757757
cdef:
758758
Py_ssize_t i, n

pandas/_libs/index.pyx

+5-5
Original file line numberDiff line numberDiff line change
@@ -256,24 +256,24 @@ cdef class IndexEngine:
256256

257257
cdef _do_monotonic_check(self):
258258
cdef:
259-
bint is_unique
259+
bint is_strict_monotonic
260260
if self.mask is not None and np.any(self.mask):
261261
self.monotonic_inc = 0
262262
self.monotonic_dec = 0
263263
else:
264264
try:
265265
values = self.values
266-
self.monotonic_inc, self.monotonic_dec, is_unique = \
266+
self.monotonic_inc, self.monotonic_dec, is_strict_monotonic = \
267267
self._call_monotonic(values)
268268
except TypeError:
269269
self.monotonic_inc = 0
270270
self.monotonic_dec = 0
271-
is_unique = 0
271+
is_strict_monotonic = 0
272272

273273
self.need_monotonic_check = 0
274274

275-
# we can only be sure of uniqueness if is_unique=1
276-
if is_unique:
275+
# we can only be sure of uniqueness if is_strict_monotonic=1
276+
if is_strict_monotonic:
277277
self.unique = 1
278278
self.need_unique_check = 0
279279

0 commit comments

Comments
 (0)