Skip to content

Commit 2def14c

Browse files
author
Junpeng Lao
committed
reverse tensor casing in LKJCorr
1 parent 529af2d commit 2def14c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pymc3/distributions/multivariate.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -840,8 +840,8 @@ class LKJCholeskyCov(Continuous):
840840
http://math.stackexchange.com/q/130026
841841
"""
842842
def __init__(self, eta, n, sd_dist, *args, **kwargs):
843-
self.n = n = tt.as_tensor_variable(n)
844-
self.eta = eta = tt.as_tensor_variable(eta)
843+
self.n = n
844+
self.eta = eta
845845

846846
if 'transform' in kwargs:
847847
raise ValueError('Invalid parameter: transform.')
@@ -943,13 +943,13 @@ def __init__(self, eta=None, n=None, p=None, transform='interval', *args, **kwar
943943
'dimension parameter p -> n. Please update your code. '
944944
'Automatically re-assigning parameters for backwards compatibility.',
945945
DeprecationWarning)
946-
self.n = p = tt.as_tensor_variable(p)
947-
self.eta = n = tt.as_tensor_variable(n)
946+
self.n = p
947+
self.eta = n
948948
eta = self.eta
949949
n = self.n
950950
elif (n is not None) and (eta is not None) and (p is None):
951-
self.n = n = tt.as_tensor_variable(n)
952-
self.eta = eta = tt.as_tensor_variable(eta)
951+
self.n = n
952+
self.eta = eta
953953
else:
954954
raise ValueError('Invalid parameter: please use eta as the shape parameter and '
955955
'n as the dimension parameter.')

0 commit comments

Comments
 (0)