Hello, I have a question about performing element-wise logical operations on numpy arrays.
If "a", "b" and "c" are numpy arrays of the same size, does the following syntax work? mask = (a > 1.0) & ((b > 3.0) | (c > 10.0)) It seems to be performing correctly, but the documentation that I've read indicates that "&" and "|" are for bitwise operations, not element-by- element operations in arrays. I'm trying to avoid using "logical_and" and "logical_or" because they make the code more cumbersome and difficult to read. Are "&" and "|" acceptable substitutes for numpy arrays? Thanks, Catherine _______________________________________________ Numpy-discussion mailing list Numpy-discussion@scipy.org http://projects.scipy.org/mailman/listinfo/numpy-discussion