Skip to content

Commit 96dd6b4

Browse files
author
Adriano Yoshino
committed
change examples from Uniform to Normal
1 parent ba6df63 commit 96dd6b4

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

docs/source/contributing/developer_guide_implementing_distribution.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -207,24 +207,24 @@ For a quick check that things are working you can try the following:
207207
import pymc as pm
208208
from pymc.distributions.distribution import get_moment
209209

210-
# pm.blah = pm.Uniform in this example
211-
blah = pm.Blah.dist([0, 0], [1, 2])
210+
# pm.blah = pm.Normal in this example
211+
blah = pm.Normal.dist(mu = 0, sigma = 1)
212212

213213
# Test that the returned blah_op is still working fine
214214
blah.eval()
215-
# array([0.62778803, 1.95165513])
215+
# array(-1.01397228)
216216

217-
# Test the get_moment
217+
# Test the get_moment method
218218
get_moment(blah).eval()
219-
# array([0.5, 1. ])
219+
# array(0.)
220220

221-
# Test the logp
222-
pm.logp(blah, [1.5, 1.5]).eval()
223-
# array([ -inf, -0.69314718])
221+
# Test the logp method
222+
pm.logp(blah, [-0.5, 1.5]).eval()
223+
# array([-1.04393853, -2.04393853])
224224

225-
# Test the logcdf
226-
pm.logcdf(blah, [1.5, 1.5]).eval()
227-
# array([ 0. , -0.28768207])
225+
# Test the logcdf method
226+
pm.logcdf(blah, [-0.5, 1.5]).eval()
227+
# array([-1.17591177, -0.06914345])
228228
```
229229

230230
## 3. Adding tests for the new `RandomVariable`

0 commit comments

Comments
 (0)