Skip to content

Commit 9c9230a

Browse files
committed
removed __len__ method for now as must return int, not array.
1 parent 82d2409 commit 9c9230a

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

brml/prob_tables/array.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,16 @@ def sum(self, variables=None):
6464
newpot.set_table(table=t)
6565
return newpot
6666

67-
def sumpot(self, axis):
67+
def sumpot(self, variables=None, sumover=True):
6868
"""
6969
This method does marginalization. It sums over a variable.
7070
TODO: See if this has to be moved to Potential class instead.
71-
:param axis:
71+
:param variables: Variables to consider.
72+
:type variables: list or numpy.array
73+
:param sumover: Whether variables specified with "variables" argument
74+
are to be summed over, or if they are the ones to keep
75+
at the end.
76+
:type sumover: bool
7277
:return:
7378
"""
7479
pass

brml/prob_tables/potential.py

-9
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,6 @@ def __repr__(self) -> str:
5353
self.variables, self.table)
5454
return s
5555

56-
def __len__(self):
57-
"""
58-
Overwrites the behavior of the __len__ call (for instance len(Array).
59-
When calling len(Array) it is equivalent to just call Array.size()
60-
:return: Number of states in the Array's table
61-
:rtype: numpy.array
62-
"""
63-
return self.size()
64-
6556
@staticmethod
6657
def _check_variables(variables):
6758
"""

0 commit comments

Comments
 (0)