Closed GregoryAshton closed 6 years ago
Thanks! Can you make the following changes:
_function_wrapper
to _FunctionWrapper
(to make clear that it's a class)args
and kwargs
be None
, and use the self.args = [] if args is None else args
pattern (as in emcee)? It doesn't matter here but it's best practice not to use mutable objects as defaults.With those changes, this looks good.
I've pushed a squashed commit with those changes :)
Thanks a lot for implementing this. Since it is an API change, it would be great if someone could push the current GitHub version to PyPI. Thanks!
The motivation for this, in particular, is one usually wants to pass some data into the loglikelihood, rather than (as in the examples) allowing it to feed in from the outer scope (not sure about the each terminology there).