I have a numpy array as of right now that looks something like:
A = [ [5, 8, 6, 2],
[5, 8, 6, 2],
[...], ... ]
Let's say I have another 1D numpy array, that looks something like array B, but has at values that correspond to each of the lists inside A.
B = [0.4, 0.6, 0.3, ...]
Now I want to delete any list within the list that has a corresponding value within B that is greater than 0.5 (this could be represented by a variable named thresh). The resulting array should look like (since the second list had a greater value):
C = [ [5, 8, 6, 2],
[...], ... ]
I am looking for a good numpy based/ pythonic way of achieving this. I am aware of np.delete, but do not understand how to use it here with a condition.