具有以下一维数组时
u = (integerTextureCoord + .5) / width
我可以通过以下方式获得数组的总和:
A = [ 0.01714783 0.04661262 0.93623955]
shape A = (3,)
总和为print("Sum A classes = " +str(np.sum(A, axis=0)))
我想知道我现在何时拥有2D阵列
Sum A classes = 1.0
形状A =(3,3)
如何取总和,所以我得到了:
A = [[0.0171483 0.04661262 0.93623955]
[0.0171483 0.04661262 0.93623955]
[0.0171483 0.04661262 0.93623955]]