GoogleML icon indicating copy to clipboard operation
GoogleML copied to clipboard

Lesson 2 Visual Decision Tree

Open ahangchen opened this issue 9 years ago • 3 comments

可以在这里讨论Lesson 2相关问题。

ahangchen avatar May 01 '16 07:05 ahangchen

请问一下: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 avatar Apr 20 '17 03:04 errorlife

@errorlife 这个问题与pydot版本有关,1.2.0以前的pydot中graph_from_dot_data() 返回单个的对象,1.2.0之后返回list,详见Pydot changelogpydotplus是支持python2.7的

ahangchen avatar Apr 20 '17 11:04 ahangchen

@ahangchen 哦哦,thx!

errorlife avatar Apr 21 '17 00:04 errorlife