summaryrefslogtreecommitdiff
path: root/numpy/lib/function_base.py
diff options
context:
space:
mode:
authorAlex <aprockhill206@gmail.com>2020-05-15 13:55:47 -0700
committerAlex <aprockhill206@gmail.com>2020-07-22 11:59:31 -0700
commitd215c1f16c74a756c1b374a96a1abd0cac11b5d3 (patch)
tree2bfd60afed746649b5d81c8d375788bad2ebc3c2 /numpy/lib/function_base.py
parentf292b95f153b37e6d6141848d2e806275b175836 (diff)
downloadnumpy-d215c1f16c74a756c1b374a96a1abd0cac11b5d3.tar.gz
change != to ==
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r--numpy/lib/function_base.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index e2f5cdd6f..41caa805e 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -4853,7 +4853,7 @@ def digitize(x, bins, right=False, edge=False):
# ``True`` decreasing ``bins[i-1] >= x > bins[i]`` -1 -1
# ========= ============= ============================ ===== =====
delta = -1 if right else 1
- idx = 0 if delta != mono else -1
+ idx = -1 if delta == mono else 0
if np.issubdtype(bins.dtype, _nx.integer):
bins[idx] += delta
else: