举个例子1:
index = np.where(boxs_sorted[:,0,1] < boxs_sorted[0,0,1])[0]
print(index)
filtered_boxs = np.delete(boxs_sorted,index,axis=0)
举个例子2:
import numpy as np
def row(c,data):
a,b=np.where(data==c)
return int(a)
data=np.loadtxt('a.txt',delimiter='\t',skiprows=0,dtype='str')
for i in range(data.shape[0]):
c=data[i][1]
if c is '':
data=np.delete(arr,row(c,data),axis=0)
---------------------
作者:稻穗子
来源:CSDN
原文:https://blog.csdn.net/u012135425/article/details/88171185
版权声明:本文为博主原创文章,转载请附上博文链接!