Function requires a pure Python function and not a Cython function.

So we wrap the function op in our own function. At the same time we're
also handling unbounded methods.

fixes #10
Merge pull request #11 from nvcleemp/master

Function requires a pure Python function and not a Cython function.