diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2016-01-11 16:35:55 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2016-01-11 16:35:55 -0700 |
commit | 4b82b1bba72ef7539c06a4577b7102da9564ca02 (patch) | |
tree | 5aefbdcf75580b1ebe3a5c6ea31523f762a3334e /numpy/core | |
parent | 3a9c90cbfd6057e9f124f3d31b82f8c0ad22cd20 (diff) | |
parent | dde1112f4476862e1e028d048bde23027ec5441c (diff) | |
download | numpy-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.src | 8 |
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(); |