【Python】ufunc 'subtract' did not contain a l
发布时间:2020-12-17 01:22:53 所属栏目:Python 来源:网络整理
导读:报错: 在linux环境下,通过bash运行python文件,传递参数给函数,中途报错: ufunc 'subtract' did not contain a loop with signature matching types dtype(' 原因: 本地windows调试时候,参数是数字赋值,所以程序正常运行。 在linux环境下,传递参数给py
报错: 在linux环境下,通过bash运行python文件,传递参数给函数,中途报错: ufunc 'subtract' did not contain a loop with signature matching types dtype(' 原因: 本地windows调试时候,参数是数字赋值,所以程序正常运行。 在linux环境下,传递参数给python文件,传入是字符串形式,所以无法正常加减运算。 dtype(' 纠正: maxv=int(args[3])? ?# 通过int()函数,将字符串强制转化为数字。 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |