原文:AttributeError: 'str' object has no attribute 'copy'

在使用Python Networkx 中的relabel nodes函数时,出现: AttributeError: str object has no attribute copy 找了半天也没发现错误出现在哪里,通过比较发现: 如果在定义图的类型时候使用G nx.MultiDiGraph 就会出现这个错误,改为G nx.Graph 错误消失。 目测是relabel nodes函数不支持Multi ...

2015-06-22 20:18 0 2309 推荐指数:

查看详情

 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM