引入math模块中的log()方法,导致"TypeError: return arrays must be of ArrayType",什么原因?


from math import log

from numpy import *
import operator

............

re = log(pro,2)

............

TypeError: return arrays must be of ArrayType

把“from math import log”放在最后

from numpy import *
import operator
from math import log

............

re = log(pro,2)

............

程序顺利通过

 

什么原因呢?希望以后能够解决

文章来自:http://www.cnblogs.com/qjziyou/p/4025335.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3