scikit-learn/scikit-learn — pull request #2394 by ndawe (2013-08-24 23:38:11+00:00)
Title: [MRG] tree export_graphviz: unused close parameter 

and close the file if `out_file` was a string.

@glouppe, @pprett, I think this makes more sense. Firstly, the close parameter was not needed and then I think it would be more reasonable to just close the `out_file` in the function if the caller passed a string and not bother return the file object. If the caller needs the file object, it can pass one as `out_file` (in which case `export_graphviz` does not close the file).