[SciPy-user] select

Pierre GM pgmdevlist at mailcan.com
Fri Mar 31 13:55:45 EST 2006


Lionel,
Select is equivalent to
 
if condition1: choice1
elsif condition2: choice2
else: default

In your second example, if condition1 is false , then condition2 is always 
true: ( ! t>90 => t<90 => t<300). Same thing if you reverse the order of the 
conditions, of course. 

I find the base functions greater, equal, less... quite useful:

select([greater(t,90)*less(t,300)],[t,])

is a good start.




More information about the SciPy-User mailing list