Python Generate a random Maxwell distribution from a normal distribution
问题 I have a set of data that follows a normal distribution in which I can fit the histogram and obtain the mean and sigma. For the sake of example, I will approximate it by generating a random normal distribution as follows: from scipy.stats import maxwell import math import random import numpy as np import matplotlib.pyplot as plt from scipy.stats import norm from scipy.optimize import curve_fit from IPython import embed # put embed() where you want to stop import matplotlib.ticker as ticker