Aug-07-2019, 12:56 PM
data = generate_data(100, np.random.uniform)Here the function np.random.uniform is given as a parameter to the function
and inside the function the according argument name generator_type can be used to call the function by adding ()
data = generate_data(100, np.random.uniform())Here you are CALLING the function np.random.uniform once and that call returns a random value
and that value is passed as a parameter to the function and then assigned to e and then to the ϵ_values list.
So your 2nd code snippet runs but all values are the same.