[SciPy-user] what is simpliest way to create this boolean array

dmitrey openopt@ukr....
Thu Aug 30 06:44:16 CDT 2007


I don't need much speed here, so the way

array( [True]*m1 + [False]*m2 + [True]*m3 + [False]*m4)

 seems to be most appropriate for me and code is very obvious for those 
who will look through.
Thanks all.
D.


Samuel GARCIA wrote:
> And this ?
> array( [True]*m1 + [False]*m2 + [True]*m3 + [False]*m4)
> sam
>
>
> dmitrey a écrit :
>   
>> hi all,
>> what's the easiest way to create bool array that contains m1 True, m2 
>> False, m3 True, m4 False?
>> Or (alternatively) creating same Python list instead.
>> Regards, D.
>>
>> _______________________________________________
>> SciPy-user mailing list
>> SciPy-user@scipy.org
>> http://projects.scipy.org/mailman/listinfo/scipy-user
>>   
>>     
>
>   



More information about the SciPy-user mailing list