如何对齐4d z数组和4d QCLOUD数组,然后找出QCLOUD max出现时的z值?
print(z.shape)
print(qcloud.shape)
out: (6, 100, 128, 128)
(6, 99, 128, 128)
答案 0 :(得分:0)
忽略(np.array(z.shape) > np.array(qcloud.shape)).any()
,您想要argmax
:
idx = np.argmax(qcloud)
result = z[tuple(idx)]