Fix bugs in 0.2 (#344)

* Fix some bugs
This commit is contained in:
FilippoOlivo
2024-09-12 18:12:59 +02:00
committed by Nicola Demo
parent f0d68b34c7
commit 30f865d912
11 changed files with 112 additions and 55 deletions

View File

@@ -84,14 +84,15 @@ class Condition:
return DomainEquationCondition(**kwargs)
else:
raise ValueError(f"Invalid keyword arguments {kwargs.keys()}.")
# TODO: remove, not used anymore
'''
if (
sorted(kwargs.keys()) != sorted(["input_points", "output_points"])
and sorted(kwargs.keys()) != sorted(["location", "equation"])
and sorted(kwargs.keys()) != sorted(["input_points", "equation"])
):
raise ValueError(f"Invalid keyword arguments {kwargs.keys()}.")
# TODO: remove, not used anymore
if not self._dictvalue_isinstance(kwargs, "input_points", LabelTensor):
raise TypeError("`input_points` must be a torch.Tensor.")
if not self._dictvalue_isinstance(kwargs, "output_points", LabelTensor):
@@ -103,3 +104,4 @@ class Condition:
for key, value in kwargs.items():
setattr(self, key, value)
'''