I have code which produces a minority game model in Python. I am running my code for parameters with single values,e.g. N = 101 and it works fine, but I want to be able to run this for multiple values for the same parameter,e.g. N = 101,201,301. I can't just set a list since my code has a lot with numpy arrays, so need to match all my arrays etc. I have now stored my code into a function as such:
def mg_theory(N,time, S, M):
# index to how we pick out a strategy
index = 1 - 2 * np.random.rand(N, M, S)
# allocating strategy randomly to all players for past m weeks
# each strategy is different for all players, each number corresponds to a different strategy
# some may have same strategy
outcomes = np.random.rand(N, S)
# guess randomly how many people are going for first m weeks
history = np.random.randint(0, N, size=2 * M)
history = np.reshape(history, (history.shape[0], 1))
....
etc
(rest of code)
As you can see I have 4 parameters, 2 of which (N and M) I would like to have multiple values. Anyone has a clue?