Skip to content

Commit

Permalink
Restructured codebase
Browse files Browse the repository at this point in the history
  • Loading branch information
hot9cups committed Oct 24, 2020
1 parent 5a3b755 commit 4dc8cef
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions probdists/Generaldistribution.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
from pathlib import Path


class Distribution:
""" Generic distribution class for calculating and
visualizing a probability distribution.
Expand Down Expand Up @@ -27,6 +30,14 @@ def read_data_file(self, file_name):
"""

if file_name == 'demo_gaussian_data':
dirname = Path(__file__).parent.absolute()
file_name = Path(dirname, 'numbers.txt')

elif file_name == 'demo_binomial_data':
dirname = Path(__file__).parent.absolute()
file_name = Path(dirname, 'numbers_binomial.txt')

with open(file_name) as file:
data_list = []
line = file.readline()
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added probdists/__pycache__/__init__.cpython-37.pyc
Binary file not shown.
File renamed without changes.
File renamed without changes.

0 comments on commit 4dc8cef

Please sign in to comment.