Skip to content

LKJCorr initialization error #1751

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
junpenglao opened this issue Feb 3, 2017 · 0 comments
Closed

LKJCorr initialization error #1751

junpenglao opened this issue Feb 3, 2017 · 0 comments

Comments

@junpenglao
Copy link
Member

Hi there,
I am suddenly getting error while trying to initialized LKJCorr. For example, if I ran the example code: LKJ_correlation.py, I got the following error:

  File "<ipython-input-4-d7da7646567f>", line 40, in <module>
    corr_triangle = pm.LKJCorr('corr', n=1, p=n_var)

  File "/home/laoj/src/pymc3/pymc3/distributions/distribution.py", line 34, in __new__
    dist = cls.dist(*args, **kwargs)

  File "/home/laoj/src/pymc3/pymc3/distributions/distribution.py", line 45, in dist
    dist.__init__(*args, **kwargs)

  File "/home/laoj/src/pymc3/pymc3/distributions/multivariate.py", line 574, in __init__
    n_elem = int(p * (p - 1) / 2)

TypeError: int() argument must be a string, a bytes-like object or a number, not 'TensorVariable'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant