summaryrefslogtreecommitdiff
path: root/numpy/core
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2016-01-11 16:35:55 -0700
committerCharles Harris <charlesr.harris@gmail.com>2016-01-11 16:35:55 -0700
commit4b82b1bba72ef7539c06a4577b7102da9564ca02 (patch)
tree5aefbdcf75580b1ebe3a5c6ea31523f762a3334e /numpy/core
parent3a9c90cbfd6057e9f124f3d31b82f8c0ad22cd20 (diff)
parentdde1112f4476862e1e028d048bde23027ec5441c (diff)
downloadnumpy-4b82b1bba72ef7539c06a4577b7102da9564ca02.tar.gz
Merge pull request #6994 from juliantaylor/signbit
BUG: make result of isfinite/isinf/signbit a boolean
Diffstat (limited to 'numpy/core')
-rw-r--r--numpy/core/src/umath/simd.inc.src8
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/core/src/umath/simd.inc.src b/numpy/core/src/umath/simd.inc.src
index 21ff97784..5da87ef60 100644
--- a/numpy/core/src/umath/simd.inc.src
+++ b/numpy/core/src/umath/simd.inc.src
@@ -559,7 +559,7 @@ static void
sse2_signbit_@TYPE@(npy_bool * op, @type@ * ip1, npy_intp n)
{
LOOP_BLOCK_ALIGN_VAR(ip1, @type@, 16) {
- op[i] = npy_signbit(ip1[i]);
+ op[i] = npy_signbit(ip1[i]) != 0;
}
LOOP_BLOCKED(@type@, 16) {
@vtype@ a = @vpre@_load_@vsuf@(&ip1[i]);
@@ -576,7 +576,7 @@ sse2_signbit_@TYPE@(npy_bool * op, @type@ * ip1, npy_intp n)
}
}
LOOP_BLOCKED_END {
- op[i] = npy_signbit(ip1[i]);
+ op[i] = npy_signbit(ip1[i]) != 0;
}
}
@@ -600,7 +600,7 @@ sse2_@kind@_@TYPE@(npy_bool * op, @type@ * ip1, npy_intp n)
#endif
#endif
LOOP_BLOCK_ALIGN_VAR(ip1, @type@, 16) {
- op[i] = npy_@kind@(ip1[i]);
+ op[i] = npy_@kind@(ip1[i]) != 0;
}
LOOP_BLOCKED(@type@, 64) {
@vtype@ a = @vpre@_load_@vsuf@(&ip1[i + 0 * 16 / sizeof(@type@)]);
@@ -641,7 +641,7 @@ sse2_@kind@_@TYPE@(npy_bool * op, @type@ * ip1, npy_intp n)
sse2_compress4_to_byte_@TYPE@(r1, r2, r3, &r4, &op[i]);
}
LOOP_BLOCKED_END {
- op[i] = npy_@kind@(ip1[i]);
+ op[i] = npy_@kind@(ip1[i]) != 0;
}
/* silence exceptions from comparisons */
npy_clear_floatstatus();