Fix single graph handling

This commit is contained in:
FilippoOlivo
2025-04-22 13:25:04 +02:00
committed by Dario Coscia
parent 53cc203db8
commit 05d6913e04
2 changed files with 6 additions and 4 deletions

View File

@@ -115,3 +115,9 @@ class ConditionInterface(metaclass=ABCMeta):
raise ValueError(
"LabelTensor must have the same labels"
)
def __getattribute__(self, name):
to_return = super().__getattribute__(name)
if isinstance(to_return, (Graph, Data)):
to_return = [to_return]
return to_return