Skip to content

Commit

Permalink
* formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
imtambovtcev committed Aug 11, 2024
1 parent 2bc53bb commit 47325ed
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions hari_plotter/graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -758,7 +758,7 @@ def check_all_paths_exist(self) -> bool:
return False
return True

@ property
@property
def mean_opinion(self) -> float:
"""
Calculates the weighted mean opinion of the nodes in the graph.
Expand Down Expand Up @@ -809,15 +809,15 @@ def get_graph(self) -> Graph:
'''Self call for union formatting with LazyHariGraph'''
return self

@ property
@property
def opinions(self):
"""
Returns a dictionary with the opinions of the nodes.
Key is the node ID, and opinion is the opinion of the node.
"""
return {node: self.nodes[node]['Opinion'] for node in self.nodes}

@ opinions.setter
@opinions.setter
def opinions(self, values: Union[int, float, Dict[Tuple[int]:float]]):
if isinstance(values, (int, float)):
for node in self.nodes:
Expand Down

0 comments on commit 47325ed

Please sign in to comment.