[NumPy-Tickets] [NumPy] #2218: numpy.any ignores imaginary part of arrays
NumPy Trac
numpy-tickets@scipy....
Mon Oct 1 10:58:14 CDT 2012
#2218: numpy.any ignores imaginary part of arrays
-------------------------+--------------------------------------------------
Reporter: mike.wimmer | Owner: somebody
Type: defect | Status: new
Priority: highest | Milestone: 1.7.0
Component: numpy.core | Version: 1.6.1
Keywords: |
-------------------------+--------------------------------------------------
Comment(by seberg):
Sorry forgot formatting :/...
{{{
--- a/numpy/core/src/multiarray/lowlevel_strided_loops.c.src
+++ b/numpy/core/src/multiarray/lowlevel_strided_loops.c.src
@@ -811,9 +811,17 @@ static void
dst_value[0] = _CONVERT_FN(src_value[0]);
dst_value[1] = _CONVERT_FN(src_value[1]);
# elif !@aligned@
- dst_value = _CONVERT_FN(src_value[0]);
+# if @is_bool2@
+ dst_value = _CONVERT_FN(src_value[0]) ||
_CONVERT_FN(src_value[1]);
+# else
+ dst_value = _CONVERT_FN(src_value[0]);
+# endif
# else
- *(_TYPE2 *)dst = _CONVERT_FN(src_value[0]);
+# if @is_bool2@
+ *(_TYPE2 *)dst = _CONVERT_FN(src_value[0]) ||
_CONVERT_FN(src_value[1]);
+# else
+ *(_TYPE2 *)dst = _CONVERT_FN(src_value[0]);
+# endif
# endif
#else
# if @is_complex2@
}}}
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/2218#comment:5>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list