I have a query about Numpy randn() function to generate random samples from standard normal distribution. I want to add some random samples using this function to my data and I want these samples must be in a range of 1 and -1.
I using this function
y = randn(100,20)
a = X + y
X is a old data matrix(100 rows and 20 columns)with values normalised between 0 and 1
a is a datamatrix with random samples y added to each cell.
but when I do this a.max() is always coming greater than 1. Is there any way to get the y in a range of 1 and -1. or Someway I can specify a range in the function itself.
Thanks in advance!