pypolyagamma
pypolyagamma copied to clipboard
Simplify and combine pgdraw and pgdrawv interface
As @tansey pointed out, we could combine these interfaces and make them more familiar to numpy users by making pgs
(i.e. the vector to be populated with samples upon output) an optional input. If it is None
, we allocate an array and return it, otherwise we populate it. This would not break the current functionality, and would be more consistent with numpy functions that support an out
argument.
We could do the same for the pgdrawvpar
function.