我是一名能翻译文本的助手。
我有一个列表,想要计算其中值的平均数(mean?)。 当我这样做时:
我有一个列表,想要计算其中值的平均数(mean?)。 当我这样做时:
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
我尝试寻求帮助,但没有找到有用的信息。
谢谢大家。