Anaconda中的错误:TypeError:“ float”对象无法解释为整数

时间:2020-02-07 18:07:43

标签: python-3.x anaconda

嗨,我正在尝试为使用python的天文学中的频谱能量分布图运行cigale代码,但出现以下错误。如果有人可以帮助我解决此错误,我将非常感谢。

 line 117, in linspace
        num = operator.index(num)
    TypeError: 'float' object cannot be interpreted as an integer

    During handling of the above exception, another exception occurred:



115     """
116     try:
117         num = operator.index(num)
118     except TypeError:
119         raise TypeError(
120             "object of type {} cannot be safely interpreted as an integer."
121                 .format(type(num)))

0 个答案:

没有答案