[Numpy-discussion] logical_and operator, &&, is missing?

Eric Firing efiring at hawaii.edu
Sat Jun 24 14:30:06 CDT 2006


It seems that the logical operators || and &&, corresponding to 
logical_or and logical_and are missing; one can do

z = logical_and(x,y)

but not

z = x && y

Is there an inherent reason, or is this a bug?

z = (x == y)

works, and a comment in umathmodule.c.src suggests that && and || should 
also:

/**begin repeat

#kind=greater, greater_equal, less, less_equal, equal, not_equal, 
logical_and, logical_or, bitwise_and, bitwise_or, bitwise_xor#
#OP=>, >=, <, <=, ==, !=, &&, ||, &, |, ^#
**/

My version is '0.9.9.2584'.

Eric





More information about the Numpy-discussion mailing list