dendrograms/astrodendro — pull request #134 by keflavich (2014-10-23 12:14:17+00:00)
Title: Replace eval; deal with inf

I encountered this error:
```
File "/Users/adam/repos/astrodendro/astrodendro/io/util.py", line 54, in parse_newick
items[branch_id] = eval("{%s}" % string[start + 1:end])
File "", line 1, in
NameError: name 'inf' is not defined
```
which occurred because my dendrogram was written with boatloads of infs int it. That's a problem with the dendrogram, and maybe it should be handled higher up - there weren't infs in my data originally, but there were nans.

More importantly, though, the use of `eval` is insecure and unreliable. I replaced it with `ast.literal_eval` so that only dictionaries containing numbers and None should be returned.

@astrofrog @ChrisBeaumont - Changing `inf` to `None` is probably not the right approach, but it's a stopgap. Can you recommend another approach?