Skip to content

Commit b1ee243

Browse files
ephjunpenglao
authored andcommitted
change WishartBartlett auxiliary variable names (#3258)
1 parent bfe0d50 commit b1ee243

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pymc3/distributions/multivariate.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ def WishartBartlett(name, S, nu, is_cholesky=False, return_cholesky=False, testv
775775
-----
776776
This is not a standard Distribution class but follows a similar
777777
interface. Besides the Wishart distribution, it will add RVs
778-
c and z to your model which make up the matrix.
778+
name_c and name_z to your model which make up the matrix.
779779
780780
This distribution is usually a bad idea to use as a prior for multivariate
781781
normal. You should instead use LKJCholeskyCov or LKJCorr.
@@ -797,11 +797,11 @@ def WishartBartlett(name, S, nu, is_cholesky=False, return_cholesky=False, testv
797797
diag_testval = None
798798
tril_testval = None
799799

800-
c = tt.sqrt(ChiSquared('c', nu - np.arange(2, 2 + n_diag), shape=n_diag,
800+
c = tt.sqrt(ChiSquared('%s_c' % name, nu - np.arange(2, 2 + n_diag), shape=n_diag,
801801
testval=diag_testval))
802-
pm._log.info('Added new variable c to model diagonal of Wishart.')
803-
z = Normal('z', 0., 1., shape=n_tril, testval=tril_testval)
804-
pm._log.info('Added new variable z to model off-diagonals of Wishart.')
802+
pm._log.info('Added new variable %s_c to model diagonal of Wishart.' % name)
803+
z = Normal('%s_z' % name, 0., 1., shape=n_tril, testval=tril_testval)
804+
pm._log.info('Added new variable %s_z to model off-diagonals of Wishart.' % name)
805805
# Construct A matrix
806806
A = tt.zeros(S.shape, dtype=np.float32)
807807
A = tt.set_subtensor(A[diag_idx], c)

0 commit comments

Comments
 (0)