小编A. *_*son的帖子

TypeError:ufunc'splaly'不包含带签名匹配类型的循环dtype('S32')dtype('S32')dtype('S32')

我是编码的新手,但我正在尝试创建一个非常简单的程序,它基本上会绘制一条线.用户将输入v和a然后v的值,a和x将确定y.我试图这样做:

x = np.linspace(0., 9., 10)
a = raw_input('Acceleration =')
v = raw_input('Velocity = ')
y=v*x-0.5*a*x**2.
Run Code Online (Sandbox Code Playgroud)

基本上这将代表抛物线,其中v是速度,a是加速度,x是时间.但是,我一直收到这个错误:

TypeError: ufunc 'multiply' did not contain a loop with signature matching types dtype('S32'
) dtype('S32') dtype('S32')
Run Code Online (Sandbox Code Playgroud)

python matplotlib typeerror

16
推荐指数
2
解决办法
3万
查看次数

标签 统计

matplotlib ×1

python ×1

typeerror ×1