[PYTHON MATRIX-SIG] logical_or and logical_and and # of arguments

David Ascher da@maigret.cog.brown.edu
Wed, 19 Mar 1997 15:16:24 -0500 (EST)


Uh...

If x = arange(5), 

logical_or(greater(x, 1),
           greater(x, 2)
          )

does what I think it should.  So does:

logical_or(greater(x, 1),
           greater(x, 2),
	   greater(x, 3)
          )

[as in (x > 1 || x > 2 || x > 3) ]

but:
 
logical_or(greater(x, 1),
           greater(x, 2),
	   greater(x, 3),
	   greater(x, 4)
          )
 
complains about invalid number of arguments. 

Either logical_or can deal with a large number of arguments or it can't --
if it can't, what does the 3-argument version mean?

--david



_______________
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________