Skip to content

Commit 0cb372d

Browse files
committed
added arbitrary stochastic dist
1 parent 406983f commit 0cb372d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pymc/distributions/distribution.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,12 @@ def discrete(shape = (), dtype = 'int64', testval = None):
7474
type = TensorType(dtype, shape)
7575
default_testvals =['mode']
7676
return locals()
77+
78+
def arbitrary(shape = (), dtype = 'float64', testval = 0):
79+
shape = np.atleast_1d(shape)
80+
type = TensorType(dtype, shape)
81+
return locals()
82+
83+
@tensordist(arbitrary)
84+
def DensityDist(logp):
85+
return locals()

0 commit comments

Comments
 (0)