-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed
Description
Following the jwave tutorial (https://ucl-bug.github.io/jwave/notebooks/prerequisites.html#fields), I got an error when calling z = field_on_plane(coords).
The error is: AttributeError: type object 'type' has no attribute 'domain'/
I found the error was in Linear.eq function where it called .domain (discretization.py, line 25)
I solved this bug by adding a Field class check:
# def __eq__(self, other):
# return tree_equal(self, other) * (self.domain == other.domain)
def __eq__(self, other):
if not isinstance(other, self.__class__):
return False
return tree_equal(self, other) and (self.domain == other.domain)
I hope this makes sense to you, thanks!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinghelp wantedExtra attention is neededExtra attention is needed