Thanks,the whole error message is here.
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
~\AppData\Local\Temp/ipykernel_33164/2673626657.py in <module>
15 # The latent function values are one sample from a multivariate normal
16 # Note that we have to call `eval()` because PyMC3 built on top of Theano
---> 17 tp_samples = pm.MvStudentT.dist(mu=mean_func(X), cov=cov_func(X), nu=3).random(size=8)
18
19 ## Plot samples from TP prior
D:\program\anaconda\envs\pymc_env\lib\site-packages\pymc3\distributions\multivariate.py in random(self, point, size)
395 dist = MvNormal.dist(mu=np.zeros_like(mu), chol=chol, shape=self.shape)
396
--> 397 samples = dist.random(point, size)
398
399 chi2_samples = np.random.chisquare(nu, size)
D:\program\anaconda\envs\pymc_env\lib\site-packages\pymc3\distributions\multivariate.py in random(self, point, size)
274
275 mu = broadcast_dist_samples_to(to_shape=output_shape, samples=[mu], size=size)[0]
--> 276 param = np.broadcast_to(param, shape=output_shape + dist_shape[-1:])
277
278 assert mu.shape == output_shape
<__array_function__ internals> in broadcast_to(*args, **kwargs)
D:\program\anaconda\envs\pymc_env\lib\site-packages\numpy\lib\stride_tricks.py in broadcast_to(array, shape, subok)
409 [1, 2, 3]])
410 """
--> 411 return _broadcast_to(array, shape, subok=subok, readonly=True)
412
413
D:\program\anaconda\envs\pymc_env\lib\site-packages\numpy\lib\stride_tricks.py in _broadcast_to(array, shape, subok, readonly)
346 'negative')
347 extras = []
--> 348 it = np.nditer(
349 (array,), flags=['multi_index', 'refs_ok', 'zerosize_ok'] + extras,
350 op_flags=['readonly'], itershape=shape, order='C')
ValueError: input operand has more dimensions than allowed by the axis remapping