Write a non-vectorized version of a code. Read the file birth_policy.py containing the code from Chapter 8.3.4. To prove that you understand what is going on in this simulation, replace all the vectorized code by explicit loops over the random arrays. For such code it is natural to use Python’s standard random module instead of numpy. random. However, to verify your alternative implementation it is important to have the same sequence of random numbers in the two programs. To this end, use numpy. random, but draw a single number at a time. Name of program file: birth_policy2.py. ⋄
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here