I have a numpy array of IoU values with 300 rows and 4 columns. A row is selected if every element in that row is less than 0.5. I wrote a code which try to do this but it returns rows in which every element is zero.
import numpy as np
iou = np.random.rand(300,4)
negative_boxes = []
for x in range(len(iou)):
if iou[x,:].any() < 0.5:
negative_boxes.append(iou[x])
How to select rows in which every element is less than 0.5?