numpy中的True/False如何转化成1/0

在array后加个0就能够,操做以下:code import numpy as np a = np.array([True, False]) print(a) print(a + 0)
相关文章
相关标签/搜索