diff options
author | Julian Taylor <jtaylor.debian@googlemail.com> | 2013-09-19 22:23:14 +0200 |
---|---|---|
committer | Julian Taylor <jtaylor.debian@googlemail.com> | 2013-09-19 22:23:14 +0200 |
commit | eb8991ebe0f653a1847b67938d9848fdc2e96a26 (patch) | |
tree | 22e06c14c1036a7e322cfc5924fcebe5d5e75332 | |
parent | afd2e135c78f53dee375d15085dba89d3d962411 (diff) | |
download | numpy-eb8991ebe0f653a1847b67938d9848fdc2e96a26.tar.gz |
ENH: remove an always true conditional
v[1] < v[2] is guaranteed by the swapping a few lines above
-rw-r--r-- | numpy/core/src/npysort/selection.c.src | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/numpy/core/src/npysort/selection.c.src b/numpy/core/src/npysort/selection.c.src index b11753367..073b5847f 100644 --- a/numpy/core/src/npysort/selection.c.src +++ b/numpy/core/src/npysort/selection.c.src @@ -176,12 +176,8 @@ static npy_intp @name@median5_@suff@( } } else { - if (@TYPE@_LT(v[IDX(2)], v[IDX(1)])) { - return 1; - } - else { - return 2; - } + /* v[1] and v[2] swapped into order above */ + return 2; } } |