Skip to content

Commit 4dc8cef

Browse files
committed
Restructured codebase
1 parent 5a3b755 commit 4dc8cef

File tree

7 files changed

+11
-0
lines changed

7 files changed

+11
-0
lines changed

probdists/Generaldistribution.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
from pathlib import Path
2+
3+
14
class Distribution:
25
""" Generic distribution class for calculating and
36
visualizing a probability distribution.
@@ -27,6 +30,14 @@ def read_data_file(self, file_name):
2730
2831
"""
2932

33+
if file_name == 'demo_gaussian_data':
34+
dirname = Path(__file__).parent.absolute()
35+
file_name = Path(dirname, 'numbers.txt')
36+
37+
elif file_name == 'demo_binomial_data':
38+
dirname = Path(__file__).parent.absolute()
39+
file_name = Path(dirname, 'numbers_binomial.txt')
40+
3041
with open(file_name) as file:
3142
data_list = []
3243
line = file.readline()
4.54 KB
Binary file not shown.
4.8 KB
Binary file not shown.
1.64 KB
Binary file not shown.
264 Bytes
Binary file not shown.
File renamed without changes.

0 commit comments

Comments
 (0)