Spaces:
Sleeping
Sleeping
Update tools/normal_distribution.py
Browse files
tools/normal_distribution.py
CHANGED
@@ -1,7 +1,9 @@
|
|
1 |
import random
|
2 |
import math
|
3 |
import matplotlib.pyplot as plt
|
|
|
4 |
|
|
|
5 |
def generate_normal_distribution(mean: float, std_dev: float, count: int = 10000)->list:
|
6 |
"""Generate a list of random numbers from a normal distribution.
|
7 |
|
@@ -32,6 +34,7 @@ def generate_normal_distribution(mean: float, std_dev: float, count: int = 10000
|
|
32 |
|
33 |
return samples
|
34 |
|
|
|
35 |
def create_histogram_and_theorical_pdf(mean: float, std_dev:float, random_numbers:list)->None:
|
36 |
"""Generate a histogram of random numbers and overlay the theoretical
|
37 |
probability density function (PDF) of a normal distribution.
|
|
|
1 |
import random
|
2 |
import math
|
3 |
import matplotlib.pyplot as plt
|
4 |
+
from smolagents import tool
|
5 |
|
6 |
+
@tool
|
7 |
def generate_normal_distribution(mean: float, std_dev: float, count: int = 10000)->list:
|
8 |
"""Generate a list of random numbers from a normal distribution.
|
9 |
|
|
|
34 |
|
35 |
return samples
|
36 |
|
37 |
+
@tool
|
38 |
def create_histogram_and_theorical_pdf(mean: float, std_dev:float, random_numbers:list)->None:
|
39 |
"""Generate a histogram of random numbers and overlay the theoretical
|
40 |
probability density function (PDF) of a normal distribution.
|