ThinkBayes2
ThinkBayes2 copied to clipboard
TypeError: '<' not supported between instances of 'Pmf' and 'Pmf'
When running redline.py's RunMixProcess() the following error is shown:
CI z (3.1, 12.483333333333333) Writing redline0.pdf Mean z 7.775313741407206 Mean zb 8.896772000693552 Mean y 4.448386000346783 Writing redline2.pdf Writing redline3.pdf 20 0.8964230763420535 2 14 3.9218230371662175 7 20 2.918634295466948 9 25 1.0969132651473539 2 2 2.9606902100440924 5 25 11.794483884166665 Average arrival rate 2.119634928117617 Mean posterior lambda 0.03674032163607093 Writing redline1.pdf
TypeError Traceback (most recent call last)
TypeError: '<' not supported between instances of 'Pmf' and 'Pmf'
Using Python version 3.7.3 Anaconda Version :
"fn": "anaconda-2019.03-py37_0.tar.bz2", "installed_by": "Anaconda3-2019.03-Windows-x86_64.exe"
OS Windows 10
Thanks.
Hi, if it helps, I was able to make the error go away and get Fig 8.5 to render is by changing
for pmf, prob in sorted(self.metapmf.Items()):
to
for pmf, prob in self.metapmf.Items():
The figure seems to get rendered alright. But I am unsure if removing sorted() is impacting the result of the analysis.