a=np.ones((4,2,2,3))print(a.shape)b=a[...,0]*a[...,2] # 这样可以降维度print(b.shape)c=a[...,0:1]*a[...,1:2] # 若0:1这里为这样就不会降维度print(c.shape)