Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- truth_arr = array([[ True, False, False, True],
- [False, True, False, False],
- [False, False, True, True],
- [False, False, False, True]])
- [(0, 0), (0, 3), (2, 2), (2, 3)]
- np.nonzero(truth_arr * truth_arr.sum(axis=1, keepdims=True)>1)
- # (array([0, 0, 2, 2]), array([0, 3, 2, 3]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement