[Numpy-discussion] Ufunc identity for bitwise reduction of object arrays.

Charles R Harris charlesr.harris at gmail.com
Fri Mar 4 10:31:11 EST 2016


Hi All,

There is currently some discussion
<https://github.com/numpy/numpy/pull/7373> on whether or not object arrays
should have an identity for bitwise reductions. Currently, they do not use
the identity for non-empty arrays, so this would only affect reductions on
empty arrays. Currently bitwise_or, bitwise_xor, and bitwise_and will
return (bool_) 0, (bool_) 0, and (int) -1 respectively in that case. Note
the non-object arrays work as they should, the question is only about
object arrays.

Thougts?

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20160304/7dfef81e/attachment.html>


More information about the NumPy-Discussion mailing list