Comment convertir un tableau booléen en tableau int

J'utilise Scilab et je souhaite convertir un tableau de booléens en un tableau d'entiers: >>> x = np.array([4, 3, 2, 1]) >>> y = 2 >= x >>> y array([False, False, True, True], dtype=bool) Dans Scilab, je peux utiliser: >>> bool2s(y) 0. 0. 1. 1. ou même...