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

Samuel GARCIA sgarcia@olfac.univ-lyon1...
Thu Aug 30 04:42:27 CDT 2007


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
>   

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Samuel Garcia
Laboratoire de Neurosciences Sensorielles, Comportement, Cognition.
CNRS - UMR5020 - Universite Claude Bernard LYON 1
Equipe logistique et technique
50, avenue Tony Garnier
69366 LYON Cedex 07
FRANCE
Tél : 04 37 28 74 64
Fax : 04 37 28 76 01
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



More information about the SciPy-user mailing list