[Numpy-discussion] improved NumPy support for boolean arrays?
Dr. Phillip M. Feldman
pfeldman@verizon....
Wed Aug 5 15:01:51 CDT 2009
Although I've used Matlab for many years and am quite new to Python, I'm
already convinced that the Python/NumPy combination is more powerful and
flexible than the Matlab base, and that it generally takes less Python code
to get the same job done. There is, however, at least one thing that is much
cleaner in Matlab-- operations on boolean arrays. If x and y are numpy
arrays of bools, I'd like to be able to create expressions like the
following:
not x (to invert each element of x)
x and y
x or y
x xor y
(not x) or y
The usual array broadcasting rules should apply. Is there any chance of
getting something like this into NumPy?
--
View this message in context: http://www.nabble.com/improved-NumPy-support-for-boolean-arrays--tp24835199p24835199.html
Sent from the Numpy-discussion mailing list archive at Nabble.com.
More information about the NumPy-Discussion
mailing list