您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

【Python】ufunc 'subtract' did not contain a loop with signature matching types dtype

5b51 2022/1/14 8:25:20 python 字数 1381 阅读 993 来源 www.jb51.cc/python

报错: 在linux环境下,通过bash运行python文件,传递参数给函数,中途报错: ufunc\'subtract\'didnotcontainaloopwithsignaturematchingtypesdtype(\'<U32\')dtype(\'<U32\')dtype(\'<U32\')

概述

报错:

在linux环境下,通过bash运行python文件,传递参数给函数,中途报错:

ufunc 'subtract' did not contain a loop with signature matching types dtype('

原因:

本地windows调试时候,参数是数字赋值,所以程序正常运行。

在linux环境下,传递参数给python文件,传入是字符串形式,所以无法正常加减运算。

dtype('

纠正:

maxv=int(args[3])   # 通过int()函数,将字符串强制转化为数字。

总结

以上是编程之家为你收集整理的【Python】ufunc 'subtract' did not contain a loop with signature matching types dtype全部内容,希望文章能够帮你解决【Python】ufunc 'subtract' did not contain a loop with signature matching types dtype所遇到的程序开发问题。


如果您也喜欢它,动动您的小指点个赞吧

除非注明,文章均由 laddyq.com 整理发布,欢迎转载。

转载请注明:
链接:http://laddyq.com
来源:laddyq.com
著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。


联系我
置顶