jeudi 25 février 2016

The size of an array created from np.random.normal

I am using the numpy's random.normal routine to create a Gaussian with a given mean and standard deviation.

array_a = an array of len(100)

gaussian = np.random.normal(loc=array_a,scale=0.1,size=len(2*array_a))

So I expect the gaussian to have a mean=array_a and stddev=0.1 and the size of the gaussian array to be 2 times array_a. However the above returns me an array with the same size as that of array_a !

How do I get the len(gaussian) to be 2 times len(array_a) with the given mean and standard deviation?




Aucun commentaire:

Enregistrer un commentaire