Iterating over a parameter distribution

First, please carefully check what you’re doing.

You are iterating over a random sample of floats. You cannot iterate over a continuous distribution, which is a probability “cloud”.

I don’t see how you conclude that Python doesn’t recognize a for loop, since the error is thrown from within that loop.

You did correctly print the array of offending values: i_N. That is an array of floats. I float cannot be used as a subscript. I suspect that what you want on that line is

`N[int(i)]`

Will that solve your problem?

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top