我有一个字典,它以日期为关键字,并填充了具有numpy.array属性的类。我想使用np.dstack从字典中的所有数组中创建一个大型数组。我现在的代码是这样的:#PARTS is my dictionary
#the .partposit is the attribute that is an array
我搞不懂为什么我在下面的代码中没有得到axis =3的错误 import numpy as np
b = np.arange(27)
b = b.reshape((3,3,3))
c = np.mean([a,b],axis=3) 我使用上面的代码来理解numpy中的axis是如何工作的。我计算出对于多维轴,轴0总是沿行(y维),轴1(x维)是沿着cols。因此,在我的例子中,我有一个3d数组