我有一个三维数组,每个波段由几个数字组成。是否有函数返回数组满足多个条件的索引位置?
我尝试了以下方法:
index_pos = numpy.where(
array[:,:,0]==10 and array[:,:,1]==15 and array[:,:,2]==30)
它返回错误:
ValueError: The truth value of an array with more than one element is ambiguous.
Use a.any() or a.all()
Tags:
目前没有回答
相关问题 更多 >
编程相关推荐