# numpy.power(x1,x2)
numpy.power(1,-1)
这样做是不允许的,只需把x1 = float(x1)就行
本文介绍了一个关于 numpy.power 函数使用的常见错误实例:尝试计算 numpy.power(1, -1) 导致的问题,并提供了解决方案 —— 确保输入参数为浮点数类型。
# numpy.power(x1,x2)
numpy.power(1,-1)
这样做是不允许的,只需把x1 = float(x1)就行

被折叠的 条评论
为什么被折叠?
