Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python plot n numbers from normal distribution

import numpy as np
import matplotlib.pyplot as plt

def get_normal(n):
  mu,sigma = 10,1
  s = np.random.normal(mu, sigma, n)
  plt.hist(s, density=True)
  plt.show()

get_normal(100)
Comment

PREVIOUS NEXT
Code Example
Python :: how to remove whitespace from string in python 
Python :: get diagonals of 2d array 
Python :: check if a number is in a list python 
Python :: find difference between two pandas dataframes 
Python :: python += dictionary 
Python :: python cointegration 
Python :: merge two dict python 
Python :: Adding two lists using map() and Lamda Function 
Python :: python inspect.getsource 
Python :: get image data cv2 
Python :: getting last n rows of column 
Python :: import combination 
Python :: wordcount pyspark 
Python :: Iterate through string in python using for loop 
Python :: python resample and interpolate 
Python :: do while python using dates 
Python :: python json nan 
Python :: print index in for loop python 
Python :: python append 
Python :: python greater than dunder 
Python :: Python How to make your application check for updates 
Python :: rolling std dev of a pandas series 
Python :: python append to tuple list 
Python :: ocaml returns the last element of a list 
Python :: python cheat 
Python :: Access Google Photo API with Python using google-api-python-client 
Python :: pandas include nan in value_counts 
Python :: type() function in python 
Python :: python startswith method 
Python :: python linear interpolation 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =