🌈 搜索
📅  最后修改于: 2022-03-11 14:46:35.889000             🧑  作者: Mango
>>> matrix = np.asarray([1, 0, 0, 1, 0, 0, 1, 0, 1]) >>> np.where(matrix == 1) (array([0, 3, 6, 8], dtype=int64),)