[MATRIX-SIG] umath.logical_blah vs normal python functions.

David J. C. Beach beach@verinet.com
Wed, 19 Nov 1997 16:26:12 -0700


Moore, Paul wrote:

> One advantage of an and/or which returns 1 or 0 is that you can play
> games with it, like multiply it by a constant. Consider
>
>    a * logical_and(a,b)
>
> which gives the same values as a where b is nonzero, but zero where b is
> zero. This is the sort of game that gets played in APL all the time....
> (OK, this isn't a very good example, but I can't make up a realistic
> case offhand).

 Is this the clear kind of programming style promoted by Python's designers?

Dave

--
David J. C. Beach
Colorado State University
mailto:beach@verinet.com
http://www.verinet.com/~beach




_______________
MATRIX-SIG  - SIG on Matrix Math for Python

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