【发布时间】:2013-12-18 05:55:12
【问题描述】:
我有一个列表,我想为她计算平均值(平均值?)。 当我这样做时:
import numpy as np #in the beginning of the code
goodPix = ['96.7958', '97.4333', '96.7938', '96.2792', '97.2292']
PixAvg = np.mean(goodPix)
我收到此错误代码:
ret = um.add.reduce(arr, axis=axis, dtype=dtype, out=out, keepdims=keepdims)
TypeError: cannot perform reduce with flexible type
我试图寻求帮助,但没有找到有用的东西
谢谢大家。
【问题讨论】:
标签: python list numpy average mean