Understanding `shape` keyword for `pm.MvNormal` distribution

If you don’t specify shape, the distribution would end up with shape==(2,). In the example, the shape argument requests 5 “batch dimensions” and you end up with a matrix of 5 independent and identically distributed mvnornals each with length 2, for a final shape==(5, 2).

You can read more about this here: Distribution Dimensionality — PyMC 5.7.2 documentation