How to delete specific rows from a numpy array using a condition?
问题 This is the code a = np.array([[ 0, 1], [ 3, 11], [4,2]]) This is what I tried a= a[a[0]>0,:] It works fine when I only have two elements, but anything more it throws an error.What I am trying to do is that in the first column if there's a value less than one than I need to delete that entire row. so the expected output is ([ 3, 11], [4,2]]) I was hoping for a solution which I could generalize even if there were more than 2 elements per item such as ([2,3,4,5], [8,2,4,6], [2,4,9,1], [5,3,2,0]