From 9cf882cd17135ac30a2f1ce9298bfd55cf2d5eab Mon Sep 17 00:00:00 2001 From: Terji Petersen Date: Tue, 28 Feb 2023 10:57:24 +0000 Subject: [PATCH] CLN: rename confusing variable name --- pandas/_libs/algos.pyx | 2 +- pandas/_libs/index.pyx | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pandas/_libs/algos.pyx b/pandas/_libs/algos.pyx index 81fd5792ee9e5..5cc5c6514a2e0 100644 --- a/pandas/_libs/algos.pyx +++ b/pandas/_libs/algos.pyx @@ -752,7 +752,7 @@ def is_monotonic(ndarray[numeric_object_t, ndim=1] arr, bint timelike): tuple is_monotonic_inc : bool is_monotonic_dec : bool - is_unique : bool + is_strict_monotonic : bool """ cdef: Py_ssize_t i, n diff --git a/pandas/_libs/index.pyx b/pandas/_libs/index.pyx index 1b42ad1c0fda7..1050d15439ebf 100644 --- a/pandas/_libs/index.pyx +++ b/pandas/_libs/index.pyx @@ -256,24 +256,24 @@ cdef class IndexEngine: cdef _do_monotonic_check(self): cdef: - bint is_unique + bint is_strict_monotonic if self.mask is not None and np.any(self.mask): self.monotonic_inc = 0 self.monotonic_dec = 0 else: try: values = self.values - self.monotonic_inc, self.monotonic_dec, is_unique = \ + self.monotonic_inc, self.monotonic_dec, is_strict_monotonic = \ self._call_monotonic(values) except TypeError: self.monotonic_inc = 0 self.monotonic_dec = 0 - is_unique = 0 + is_strict_monotonic = 0 self.need_monotonic_check = 0 - # we can only be sure of uniqueness if is_unique=1 - if is_unique: + # we can only be sure of uniqueness if is_strict_monotonic=1 + if is_strict_monotonic: self.unique = 1 self.need_unique_check = 0