更新时间:2022-12-09 22:02:58
只需
s = numpy.sum((A[:,:,0:3]-B[:,:,0:3])**2)
(我预计可能只是总和((AB)** 2)
如果形状总是(,,3))
(which I expect is likely just sum((A-B)**2)
if the shape is always (,,3))
您还可以使用sum方法:((AB)** 2).sum ()
You can also use the sum method: ((A-B)**2).sum()
对吗?