Python:无法在dict中检索numpy矩阵的形状

Python:无法在dict中检索numpy矩阵的形状,python,numpy,matrix,Python,Numpy,Matrix,我将numpy矩阵存储在dict中。但是,当我试图找出矩阵的形状时,它失败了: dict_ = {'one' : np.zeros(shape=(5, 4)), 'two' : np.zeros(shape=(2, 5))} print type(dict_['one']) <type 'numpy.ndarray'> print dict_['one'].shape() TypeError: 'tuple' object is not callable dict_uuz={'

我将numpy矩阵存储在dict中。但是,当我试图找出矩阵的形状时,它失败了:

dict_ = {'one' : np.zeros(shape=(5, 4)), 'two' : np.zeros(shape=(2, 5))}

print type(dict_['one'])
<type 'numpy.ndarray'>

print dict_['one'].shape()
TypeError: 'tuple' object is not callable
dict_uuz={'one':np.zeros(形状=(5,4)),'two':np.zeros(形状=(2,5))}
打印类型(dict_uu['one'])
打印命令['one'].shape()
TypeError:“tuple”对象不可调用

我这里缺少什么?

属性
shape
不可调用,您需要按如下方式使用它:

print dict_['one'].shape

天哪,我怎么会错过这个?也许需要休息一下。谢谢anyways@DarshanChaudhary欢迎,如果有帮助的话,你可以通过投票向社区说这句话并接受答案。在一定时间内不能接受。当我被允许的时候我会做的。