I'm trying to write a function (rangNM) generating M normally distributed samples of length N and for some reason this results in a syntax error at line 4. Does anyone know what might be causing this? Thanks in advance for the help.
def rangNM(N, M):
iseed == 0
sample = []
for iseed < M:
np.random.seed(iseed)
sample.append(np.random.normal(scale=1, loc=0, size=N))
iseed += 1
return(sample)
rangNM(10, 5)
Aucun commentaire:
Enregistrer un commentaire