Skip to content

Commit b96a5b2

Browse files
committed
moved array, potential and const to prob_table package
1 parent 471067e commit b96a5b2

8 files changed

+8
-8
lines changed

Demo/demoClouseau.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import numpy as np
2-
from brml.array import Array
2+
from brml.prob_tables.array import Array
33
from brml.multpots import multpots
44
from brml.variables import Variable
55

brml/prob_tables/__init__.py

Whitespace-only changes.

brml/array.py brml/prob_tables/array.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import copy
22
import numpy as np
3-
from brml.potential import Potential
3+
from brml.prob_tables.potential import Potential
44

55

66
class Array(Potential):

brml/const.py brml/prob_tables/const.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from brml.potential import Potential
1+
from brml.prob_tables.potential import Potential
22
import numpy as np
33

44

@@ -24,7 +24,7 @@ def _check_table(self, value):
2424
3. List with length 1
2525
4. Array with size 1
2626
27-
:param table: Value to be constant probability table
27+
:param value: Value to be constant probability table
2828
:return:
2929
"""
3030
# If numeric -> return np.array with that number
@@ -67,5 +67,5 @@ def evalpot(self, evvariables=0, evidence=0):
6767
pot = Const(0.7)
6868
print("Const potential:", pot)
6969
print("Table: ", pot.table)
70-
# TODO: Need to move .size() method to Potential class instead of Array
7170
print("Variables: ", pot.variables)
71+
print("Size: ", pot.size())
File renamed without changes.

check/array_sum.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from brml.array import Array
1+
from brml.prob_tables.array import Array
22
import numpy as np
33

44

check/potential_table.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from brml.potential import Potential
1+
from brml.prob_tables.potential import Potential
22
import numpy as np
33

44

check/potential_variables.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import numpy as np
2-
from brml.potential import Potential
2+
from brml.prob_tables.potential import Potential
33

44

55
def initialization(variables):

0 commit comments

Comments
 (0)