这是一个选择:
import numpyvals = numpy.array([[1,2,3],[4,5,6],[7,8,7],[0,4,5],[2,2,1],[0,0,0],[5,4,3]])a = (vals[:,0] == vals[:,1]) | (vals[:,1] == vals[:,2]) | (vals[:,0] == vals[:,2])vals = numpy.delete(vals, numpy.where(a), axis=0)
欢迎分享,转载请注明来源:内存溢出
这是一个选择:
import numpyvals = numpy.array([[1,2,3],[4,5,6],[7,8,7],[0,4,5],[2,2,1],[0,0,0],[5,4,3]])a = (vals[:,0] == vals[:,1]) | (vals[:,1] == vals[:,2]) | (vals[:,0] == vals[:,2])vals = numpy.delete(vals, numpy.where(a), axis=0)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)