我有一个看起来有点像这样的 python 列表:
[[0,0,0,0,0,0,0,0,0,0,0,0,0,0],[0,0,90,1,9999,0,0,0,0,0,0,0,00,0],
[0,0,0,0,0,0,0,0,0,0,0,0,00,0],[0,0,90,1,9999,1,2,0,0,9999,0,0,00,0].....till about 30 rows]
我需要从该列表中找到具有 9999 的最大行,或者换句话说,它的所有元素都不为零。请帮我解决一下这个。谢谢!!
我试过了:
print max((numpy.where(v1==9999)[0]))
但这只是给了我一些奇怪的错误,比如'int' object not iterable
或numpy.where does not accept keywords n
等等!