Skip to content
Advertisement

random number generating function as argument in python

I want to pass a function which generates random normal numbers to another function, do some calculations and pass again the random function x times. At the end there should be a Dataframe with x colums with diffrent randomly generated outcomes.

My code looks like this:

JavaScript

But this gives me always identical columns.

JavaScript

Advertisement

Answer

I don’t think you can pass the function like that. You should pass the function and the argument separately

Something like

JavaScript

be aware that the cov matrix should be symmetrical and positive.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement