python 怎么把list中的True映为1,False映射为0

array = np.array([True, False])

array.astype(int)

猜你喜欢

转载自blog.csdn.net/u_7890/article/details/85058365