lundi 29 juin 2015

Does calling random.normal on an array of values add noise?

I saw this pattern in someone's code:

import numpy as np
# Create array
xx = np.linspace(0.0, 100.0, num=100)
# Add Noise
xx = np.random.normal(xx)

and it seems to add some noise to each value of the array, but I can't find any documentation for this. What's happening? What determines the properties (i.e. scaling) of the noise? Is the given value being treated as the mean (i.e. the loc parameter) of each sampling from the normal distribution?

I'd also be very curious to know why this behavior doesn't seem to be covered in the documentation.




Aucun commentaire:

Enregistrer un commentaire