# Examples of random() in custom distribution?

**URL:** <https://discourse.pymc.io/t/examples-of-random-in-custom-distribution/1263>\
**Category:** Questions\
**Created:** [May 23, 2018, 8:19pm UTC](https://discourse.pymc.io/t/examples-of-random-in-custom-distribution/1263 "2018-05-23T20:19:31Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![junpenglao](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/junpenglao/32/8_2.png) [@junpenglao](https://discourse.pymc.io/u/junpenglao)\
**Post date:** [August 29, 2018, 3:18pm UTC](https://discourse.pymc.io/t/examples-of-random-in-custom-distribution/1263/10 "2018-08-29T15:18:47Z")

</div>

> [@Jack\_Caster](#):
>
> Instead I should get a (trace\_length, observed\_size) array?

Yes.

I changed this behavior in [Improve sample\_ppc by junpenglao · Pull Request #3053 · pymc-devs/pymc · GitHub](https://github.com/pymc-devs/pymc3/pull/3053/). I think it makes more sense, see discussion here: [Sample\_ppc shape - #2 by junpenglao](https://discourse.pymc.io/t/sample-ppc-shape/1530/2)

---

_[View the full topic](https://discourse.pymc.io/t/examples-of-random-in-custom-distribution/1263)._
