Skip to content
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

az.compare giving me error message - "You can only assign a scalar value not a <class 'tuple'>" #2242

Closed
PPatty666 opened this issue May 9, 2023 · 4 comments

Comments

@PPatty666
Copy link

PPatty666 commented May 9, 2023

Describe the bug
I am learning Bayesian Analysis with Python - 2nd Edition. In the code example from chapter 5 - Model Comparison, az.compare give me an error message saying "You can only assign a scalar value not a <class 'tuple'>".

I attached an pdf with the codes, error messages and my notes. Thank you very much for helping me with this!

To Reproduce
I downloaded the code from here --

https://github.com/aloctavodia/BAP

and installed pymc3 to run the codes.

Expected behavior
I want to have a table like --
image

Additional context
For pymc3 installation, I followed the Method 1 from here --

pymc-devs/pymc#4937

(Method 2 in that link worked for me before but doesn't work now just FYI.)

from my conda list, I have --
arviz 0.12.1
pymc3 3.11.5

Thank you so very much again. Greatly appreciate it!
az.compare_error_Patty-20230509.pdf

@OriolAbril
Copy link
Member

what is your pandas version?

@PPatty666
Copy link
Author

what is your pandas version?

Hello! I have "pandas 2.0.1" listed on my conda list.

@OriolAbril
Copy link
Member

OriolAbril commented May 12, 2023

Can you try if the error persists with pandas<2 and if it still doesn't work with pandas 1.4.2? (1.4.2 is the version released around the months previous to arviz 0.12)

@PPatty666
Copy link
Author

Can you try if the error persists with pandas<2 and if it still doesn't work with pandas 1.4.2? (1.4.2 is the version released around the months previous to arviz 0.12)

Hello! I just tried and it worked! Thank you so so much 👍

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

2 participants