Search
 
SCRIPT & CODE EXAMPLE
 

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.'''
Comment

PREVIOUS NEXT
Code Example
Python :: plotly vertical bar chart 
Python :: python add string and int 
Python :: python ordereddict reverse 
Python :: python float to decimal 
Python :: pandas apply function to each row lambda 
Python :: how to count the occurrence of a word in string python 
Python :: python beautiful 
Python :: flask setup 
Python :: load json py 
Python :: pandas merge python 
Python :: numpy logspace 
Python :: string to bits python 
Python :: python save image to pdf 
Python :: python pathlib create directory if not exists 
Python :: python to c# 
Python :: split string in python 
Python :: django queryset last 10 
Python :: python define an array of dictonary 
Python :: selenium open inspect 
Python :: http server in python 
Python :: python check tuple length 
Python :: python switch case 3.10 
Python :: print( n ) in python 
Python :: python cast list to float 
Python :: python open all files of type csv 
Python :: how to remove quotes from a string in python 
Python :: extract int from string python 
Python :: how to use cv2.COLOR_BGR2GRAY 
Python :: one line if statement without else 
Python :: pandas check match string lowercase 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =