@@ -352,42 +352,49 @@ class MvStudentT(Continuous):
352352 nu : tensor_like of float
353353 Degrees of freedom, should be a positive scalar.
354354 Sigma : tensor_like of float, optional
355- Covariance matrix. Use `cov ` in new code.
355+ Scale matrix. Use `scale ` in new code.
356356 mu : tensor_like of float, optional
357357 Vector of means.
358- cov : tensor_like of float, optional
359- The covariance matrix.
358+ scale : tensor_like of float, optional
359+ The scale matrix.
360360 tau : tensor_like of float, optional
361361 The precision matrix.
362362 chol : tensor_like of float, optional
363- The cholesky factor of the covariance matrix.
363+ The cholesky factor of the scale matrix.
364364 lower : bool, default=True
365365 Whether the cholesky fatcor is given as a lower triangular matrix.
366366 """
367367 rv_op = mv_studentt
368368
369369 @classmethod
370- def dist (cls , nu , Sigma = None , mu = None , cov = None , tau = None , chol = None , lower = True , ** kwargs ):
370+ def dist (cls , nu , Sigma = None , mu = None , scale = None , tau = None , chol = None , lower = True , ** kwargs ):
371+ if kwargs .get ("cov" ) is not None :
372+ warnings .warn (
373+ "Use the scale argument to specify the scale matrix."
374+ "cov will be removed in future versions." ,
375+ FutureWarning ,
376+ )
377+ scale = kwargs .pop ("cov" )
371378 if Sigma is not None :
372- if cov is not None :
373- raise ValueError ("Specify only one of cov and Sigma" )
374- cov = Sigma
379+ if scale is not None :
380+ raise ValueError ("Specify only one of scale and Sigma" )
381+ scale = Sigma
375382 nu = at .as_tensor_variable (floatX (nu ))
376383 mu = at .as_tensor_variable (floatX (mu ))
377- cov = quaddist_matrix (cov , chol , tau , lower )
384+ scale = quaddist_matrix (scale , chol , tau , lower )
378385 # Aesara is stricter about the shape of mu, than PyMC used to be
379- mu = at .broadcast_arrays (mu , cov [..., - 1 ])[0 ]
386+ mu = at .broadcast_arrays (mu , scale [..., - 1 ])[0 ]
380387
381- return super ().dist ([nu , mu , cov ], ** kwargs )
388+ return super ().dist ([nu , mu , scale ], ** kwargs )
382389
383- def moment (rv , size , nu , mu , cov ):
390+ def moment (rv , size , nu , mu , scale ):
384391 moment = mu
385392 if not rv_size_is_none (size ):
386393 moment_size = at .concatenate ([size , [mu .shape [- 1 ]]])
387394 moment = at .full (moment_size , moment )
388395 return moment
389396
390- def logp (value , nu , mu , cov ):
397+ def logp (value , nu , mu , scale ):
391398 """
392399 Calculate log-probability of Multivariate Student's T distribution
393400 at specified value.
@@ -401,7 +408,7 @@ def logp(value, nu, mu, cov):
401408 -------
402409 TensorVariable
403410 """
404- quaddist , logdet , ok = quaddist_parse (value , mu , cov )
411+ quaddist , logdet , ok = quaddist_parse (value , mu , scale )
405412 k = floatX (value .shape [- 1 ])
406413
407414 norm = gammaln ((nu + k ) / 2.0 ) - gammaln (nu / 2.0 ) - 0.5 * k * at .log (nu * np .pi )
0 commit comments