GoogleML
GoogleML copied to clipboard
Lesson 2 Visual Decision Tree
可以在这里讨论Lesson 2相关问题。
请问一下:pydot.graph_from_dot_data() returns a list,我按照Stackoverflow的回答把
graph.write_pdf("iris.pdf")
改成
graph[0].write_pdf("iris.pdf")
就不报 AttributeError: 'list' object has no attribute 'write_pdf' 错误了。这是什么问题呢,我用的是 Python 2.7
还有,请问 pydotplus 是针对 Python 3 版本的吗?
@errorlife 这个问题与pydot版本有关,1.2.0以前的pydot中graph_from_dot_data() 返回单个的对象,1.2.0之后返回list,详见Pydot changelog, pydotplus是支持python2.7的
@ahangchen 哦哦,thx!