📅  最后修改于: 2022-03-11 14:47:18.137000             🧑  作者: Mango
array([False, False, True, True], dtype=bool)
>>> 1*y # Method 1
array([0, 0, 1, 1])
>>> y.astype(int) # Method 2
array([0, 0, 1, 1])