for i in predictions: if i ==1: 将下列的代码转换成用python写的 good[j] = abstract[i,:,:] j = j+1 else bad[k] = abstract[i,:,:] k = k+1
时间: 2023-02-25 12:56:18 浏览: 73
pypc:Python中的预测编码
下面是代码的 Python 版本:
```
j = 0
k = 0
for i in predictions:
if i == 1:
good[j] = abstract[i, :, :]
j += 1
else:
bad[k] = abstract[i, :, :]
k += 1
```
阅读全文