numpy创建零矩阵时,矩阵的大小要用圆括号表示。 例如生成4*1的矩阵,正确的写法是 np.zeros((4,1)) 如果写成np.zeros(4,1)就会出现TypeError: data type not understood