[Numpy-discussion] Different behaviour logical_and/and

Aureli Soria Frisch Aureli.Soria_Frisch at ipk.fhg.de
Wed Mar 20 10:48:04 CST 2002


Hi all,

In the version of Numeric with MacPython2.2 the functions
"Numeric.logical_and" and "and" behave different, although up to the
on-line documentation they should behave the same:

>>> Numeric.logical_and(a,b)
array([0, 1, 0, 0, 0, 0, 1, 0, 0, 0])
>>> a and b
array([1, 1, 0, 1, 0, 0, 1, 1, 1, 0])

for arrays:

>>> a
array([0, 1, 0, 0, 1, 0, 1, 0, 0, 1])
>>> b
array([1, 1, 0, 1, 0, 0, 1, 1, 1, 0])

or am I misunderstood something...?

Regards,
Aureli

#################################
Aureli Soria Frisch
Fraunhofer IPK
Dept. Pattern Recognition

post: Pascalstr. 8-9, 10587 Berlin, Germany
e-mail: aureli at ipk.fhg.de
fon: +49 30 39006-150
fax: +49 30 3917517
web: http://vision.fhg.de/~aureli/web-aureli_en.html
#################################






More information about the Numpy-discussion mailing list