Traceback (most recent call last): File "E:\pythonProject\ADMM\wiene1.py", line 103, in <module> ax2.axvline(x=fai

动态 未结 0 125
小小草
小小草 LV1 2023年9月23日 23:40 发表
这个错误提示表明 `failure_time` 变量未定义。这可能是因为您在调用 `calculate_composite_index` 函数时没有正确地获取返回值。 请检查您的代码,确保在调用 `calculate_composite_index` 函数时,已经正确地获取了函数返回的两个值:`composite_index` 和 `failure_time`。例如: ```python composite_index, failure_time = calculate_composite_index(data, weights) ``` 如果您已经正确地获取了返回值,请检查一下 `ax2.axvline(x=failure_time, color=color, linestyle='--')` 这行代码是否在 `calculate_composite_index` 函数之后执行。如果是,请将其移动到函数调用之后。
收藏(0)  分享
相关标签: 智能问答
问题没解决?让AI助手帮你作答 AI助手
0个回复
  • 消灭零回复