Probabilistic-Programming-and-Bayesian-Methods-for-Hackers icon indicating copy to clipboard operation
Probabilistic-Programming-and-Bayesian-Methods-for-Hackers copied to clipboard

Chapter 2 using default random() makes error

Open utt54321 opened this issue 5 years ago • 0 comments

While excecuting follow code: samples = [lambda_1.random()[0] for i in range(20000)] it shows:

Traceback (most recent call last):
  File "C:/Users/13910/PycharmProjects/untitled/rist.py", line 15, in <module>
    samples = [lambda_1.random()[0] for i in range(20000)]
  File "C:/Users/13910/PycharmProjects/untitled/rist.py", line 15, in <listcomp>
    samples = [lambda_1.random()[0] for i in range(20000)]
IndexError: too many indices for array

utt54321 avatar Apr 06 '20 08:04 utt54321