# Updating priors

**URL:** <https://discourse.pymc.io/t/updating-priors/9964>\
**Category:** v5\
**Created:** [July 20, 2022, 7:54am UTC](https://discourse.pymc.io/t/updating-priors/9964 "2022-07-20T07:54:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dodi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/dodi/32/5356_2.png) [@dodi](https://discourse.pymc.io/u/dodi)\
**Post date:** [July 20, 2022, 7:54am UTC](https://discourse.pymc.io/t/updating-priors/9964/1 "2022-07-20T07:54:34Z")

</div>

I am trying to reproduce the “Updating priors” example in pymc4. The current example is still in pymc3. I believe a few lines needs to change around “trace” and interpolation. Would appreciate what the code should look like in pymc4 to make the “updating priors” example work.

tx

---

<div class="post-metadata">

**Author:** ![OriolAbril](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/oriolabril/32/2497_2.png) [@OriolAbril](https://discourse.pymc.io/u/OriolAbril)\
**Post date:** [July 20, 2022, 9:49am UTC](https://discourse.pymc.io/t/updating-priors/9964/2 "2022-07-20T09:49:07Z")

</div>

There are some issues (not very relevant for that particular model in the example but that make it hard for the method discussed to be generalized), I covered them a bit in [Some dimensionality devils | Oriol unraveled](https://oriolabrilpla.cat/python/arviz/pymc/xarray/xarray-einstats/2022/05/25/too-eager-reduction.html#Univariate-priors). I’d recommend rewriting it from scratch using the new [API Reference — pymc\_experimental 0.0.1 documentation](https://www.pymc.io/projects/experimental/en/latest/api_reference.html#pymc_experimental.utils.prior.prior_from_idata).

---

<div class="post-metadata">

**Author:** ![dodi](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/dodi/32/5356_2.png) [@dodi](https://discourse.pymc.io/u/dodi)\
**Post date:** [July 20, 2022, 10:17am UTC](https://discourse.pymc.io/t/updating-priors/9964/3 "2022-07-20T10:17:17Z")

</div>

thank you.
