Skip to content

Commit

Permalink
modified validate_input ()
Browse files Browse the repository at this point in the history
  • Loading branch information
Abodi-Massarwa committed Jul 22, 2024
1 parent 616a3fe commit 9bc7925
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import networkx as nx
import matplotlib.pyplot as plt
import logging
import numpy as np

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -1247,7 +1248,7 @@ def validate_valuations(agent_item_valuations: dict[str, dict[str, int]], is_ide
if not isinstance(key,str) or not isinstance(value,dict):
raise ValueError(f"agent_item_valuations {agent_item_valuations} isn't structured correctly")
for inner_key,inner_value in value.items():
if not isinstance(inner_key,str) or not isinstance(inner_value,int):
if not isinstance(inner_key,str) or not isinstance(inner_value,(int,np.int64)):
raise ValueError(f"agent_item_valuations {agent_item_valuations} isn't structured correctly,inner value type is {type(inner_value)}")

if is_identical:
Expand Down

0 comments on commit 9bc7925

Please sign in to comment.