pangolin.interface.loggamma

Contents

pangolin.interface.loggamma#

pangolin.interface.loggamma(a)#

Create an RV by applying pangolin.ir.Loggamma to its parents.

This function belongs to the default interface. Thus, all arguments must either be scalar or mutually broadcastable using simple broadcasting, unless changed within an overload() block.

Parameters:

a (RVLike) – parent 0.

Returns:

ir.RV – RV whose operation is pangolin.ir.Loggamma when all parents are scalar, or one or more nested pangolin.ir.VMap operations around that type when broadcasting is required. The operation has 1 parent.

Return type:

RV

Examples

>>> import pangolin.interface as pi
>>> x = pi.loggamma(0.1)
>>> x
RV(Loggamma(), RV(Constant(0.1)))
>>> x.shape
()
>>> y = pi.loggamma([0.1, 0.1])
>>> y
RV(VMap(Loggamma(), [0], 2), RV(Constant([0.1,0.1])))
>>> y.shape
(2,)

Notes

Do we want scipy.special.loggamma or scipy.special.gammaln?