Derivs

This adds `d()` and `d2()` convenience functions, which work with numpy to broadcast across arrays, as discussed in issue #5 (and thus should close #5).

This branch is based on my `testing` branch (PR #7), so you might want to merge that first.