报错:
在linux环境下,通过bash运行python文件,传递参数给函数,中途报错:
ufunc 'subtract' did not contain a loop with signature matching types dtype(' 原因: 本地windows调试时候,参数是数字赋值,所以程序正常运行。 在linux环境下,传递参数给python文件,传入是字符串形式,所以无法正常加减运算。 dtype(' 纠正: maxv=int(args[3]) # 通过int()函数,将字符串强制转化为数字。