# Need Guidance: Implementing Dims for Multivariate distributions

**URL:** <https://discourse.pymc.io/t/need-guidance-implementing-dims-for-multivariate-distributions/17533>\
**Category:** Development\
**Created:** [January 21, 2026, 8:01pm UTC](https://discourse.pymc.io/t/need-guidance-implementing-dims-for-multivariate-distributions/17533 "2026-01-21T20:01:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Moazzam-SK](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/moazzam-sk/32/9288_2.png) [@Moazzam-SK](https://discourse.pymc.io/u/Moazzam-SK)\
**Post date:** [January 21, 2026, 8:01pm UTC](https://discourse.pymc.io/t/need-guidance-implementing-dims-for-multivariate-distributions/17533/1 "2026-01-21T20:01:19Z")

</div>

I’m a new guy here. I’m trying to implement [dims for multivariate distributions](https://github.com/pymc-devs/pymc/issues/7874), starting with MvStudentT, but I can’t exactly understand how to write the `dist()` and `xrv_op()` functions. I have a slight understanding of what these functions are for, but I don’t understand the unique requirements that each distribution has for these functions.

Can someone explain the requirements that `MvStudentT` has from `dist()` and `xrv_op()`?

---

<div class="post-metadata">

**Author:** ![ricardoV94](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.pymc.io/ricardov94/32/5775_2.png) [@ricardoV94](https://discourse.pymc.io/u/ricardoV94)\
**Post date:** [January 21, 2026, 10:28pm UTC](https://discourse.pymc.io/t/need-guidance-implementing-dims-for-multivariate-distributions/17533/2 "2026-01-21T22:28:22Z")

</div>

The `dist` method is just syntactic sugar, so we can offer different parametrizations / optional arguments for the distribution. In the end we always use the same set (say mu/sigma), even if user provided (mu/tau). We return those to the base class with `super().dist(list_of_arguments], **kwargs)`. That list has a specific order, which is the order of parameters in the underlying random operator. We don’t want to ask the user to know this order, that’s also part of what `dist` does.

The `xrv_op`, is the random dim-aware version of `rv_op` in regular distributions. For your case it will probably look very similar to the multivariate\_normal.xrv\_op. You just have an extra nu argument, that doesn’t have any core dims. Check the source code to see if it starts clearing the picture.
