Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

np.random.normal

import numpy as np
np.random.normal(loc=0.0, scale=1.0, size=None)  #Example below

mean, standard_deviation, samples = 23 ,0.8 ,1000

normal_samples = np.random.normal(loc=mean,scale=standard_deviation, size=samples)
'''Parameters
loc :float or array_like of floats
Mean (“centre”) of the distribution.

scale: float or array_like of floats
Standard deviation (spread or “width”) of the distribution. 
Must be non-negative.

size :int or tuple of ints, optional Output shape. 
If the given shape is, e.g., (m, n, k), 
then m * n * k samples are drawn. 
If size is None (default),
a single value is returned if loc and scale are both scalars.
Otherwise, np.broadcast(loc, scale).size samples are drawn.'''

'''Returns
outndarray or scalar
Drawn samples from the parameterized normal distribution.'''
 
PREVIOUS NEXT
Tagged:
ADD COMMENT
Topic
Name
9+3 =