【发布时间】:2019-06-05 00:59:34
【问题描述】:
我有一个不同长度的大型数组列表。我想找到每个大于420的数组的位置。例如[size=(134,7),size=(620,7),size=(800,7),......]
我的代码在下面
for x in x_train:
if len(x)>420:
print(x_train.index(x))
我收到了这个错误:
DeprecationWarning: elementwise == comparison failed; this will raise an
error in the future.
什么是正确的解决方案?
【问题讨论】:
-
请显示完整的堆栈跟踪和/或确保这将使用这个最少的代码重现。看起来像其他代码或库内部的弃用。
标签: python arrays list indexing