dwf/hyperopt — pull request #1 by jaberg (2013-11-23 01:55:44+00:00)
Title: PartialPlus: getitem and arg-lookup

Should have been two commits, but they overlapped. I'm bringing in two tricky but important features from partial.base: PartialPlus.arg and getitem syntax, which we can use as the basis for lazy-evaluation.

The arg-calculation is used to e.g. locate rng arguments, labels of hyperparameter nodes, and maybe other things too.

The getitem syntax useful.

The use of lists and getitem together for lazy-evaluation is less-obviously the right way to do that. But I'm willing to propose it. Here's what I mean. Suppose we define `z` like this:
```python
z = PartialPlus(list, 0, 1, PartialPlus(0) / PartialPlus(0))[0]
```

I'm proposing that we modify the evaluate function so that `evaluate(z)` does evaluate the partials in the list positions we're not returning in `z`.