How to convert a boolean array to an int array

前端 未结 0 1709
無奈伤痛
無奈伤痛 2020-12-23 06:34

I use Scilab, and want to convert an array of booleans into an array of integers:

>>> x = np.array([4, 3, 2, 1])
>>> y = 2 >= x
>>         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题